Disallow multiline in About editing

This commit is contained in:
Josh Perez 2021-10-01 15:27:34 -04:00 committed by GitHub
parent 9a1430a460
commit c99066de9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -186,6 +186,7 @@ export const ProfileEditor = ({
}
focusNode.focus();
focusNode.setSelectionRange(focusNode.value.length, focusNode.value.length);
}, [editState]);
useEffect(() => {
@ -328,7 +329,7 @@ export const ProfileEditor = ({
setStagedProfile(profileData => ({
...profileData,
aboutEmoji: stagedProfile.aboutEmoji,
aboutText: value,
aboutText: value.replace(/(\r\n|\n|\r)/gm, ''),
}));
} else {
setStagedProfile(profileData => ({