Disallow multiline in About editing
This commit is contained in:
parent
9a1430a460
commit
c99066de9b
|
@ -186,6 +186,7 @@ export const ProfileEditor = ({
|
||||||
}
|
}
|
||||||
|
|
||||||
focusNode.focus();
|
focusNode.focus();
|
||||||
|
focusNode.setSelectionRange(focusNode.value.length, focusNode.value.length);
|
||||||
}, [editState]);
|
}, [editState]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -328,7 +329,7 @@ export const ProfileEditor = ({
|
||||||
setStagedProfile(profileData => ({
|
setStagedProfile(profileData => ({
|
||||||
...profileData,
|
...profileData,
|
||||||
aboutEmoji: stagedProfile.aboutEmoji,
|
aboutEmoji: stagedProfile.aboutEmoji,
|
||||||
aboutText: value,
|
aboutText: value.replace(/(\r\n|\n|\r)/gm, ''),
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
setStagedProfile(profileData => ({
|
setStagedProfile(profileData => ({
|
||||||
|
|
Loading…
Reference in New Issue