Skip to content

Commit

Permalink
Disallow multiline in About editing
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-signal committed Oct 1, 2021
1 parent 9a1430a commit c99066d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ts/components/ProfileEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ export const ProfileEditor = ({
}

focusNode.focus();
focusNode.setSelectionRange(focusNode.value.length, focusNode.value.length);
}, [editState]);

useEffect(() => {
Expand Down Expand Up @@ -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 => ({
Expand Down

0 comments on commit c99066d

Please sign in to comment.