mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
fixed long Text, submit it only focused field, update value on paste
This commit is contained in:
@@ -46,7 +46,7 @@ const LongText = (props: Props) => {
|
||||
const open = Boolean(anchorEl);
|
||||
const id = open ? "no-transition-popper" : undefined;
|
||||
const onClickAway = (event: any) => {
|
||||
if (event.target.id !== id) {
|
||||
if (event.target.id !== id && open) {
|
||||
onSubmit(text);
|
||||
setAnchorEl(null);
|
||||
}
|
||||
@@ -70,7 +70,7 @@ const LongText = (props: Props) => {
|
||||
placeholder="enter text"
|
||||
defaultValue={text}
|
||||
autoFocus
|
||||
onKeyPress={(e: any) => {
|
||||
onChange={(e: any) => {
|
||||
setText(e.target.value);
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user