From caba23acb6fcb5b33565806d1b9a65233ae784e3 Mon Sep 17 00:00:00 2001 From: melloware Date: Wed, 5 Apr 2023 07:57:42 -0400 Subject: [PATCH] Fix #4221: Mention target must always be input textarea --- components/lib/mention/Mention.js | 1 + 1 file changed, 1 insertion(+) diff --git a/components/lib/mention/Mention.js b/components/lib/mention/Mention.js index 79a8153cce..ecf854c6f5 100644 --- a/components/lib/mention/Mention.js +++ b/components/lib/mention/Mention.js @@ -182,6 +182,7 @@ export const Mention = React.memo( const nextText = value.substring(triggerState.index + currentText.length); inputRef.current.value = `${prevText}${selectedText} ${nextText}`; + event.target = inputRef.current; props.onChange && props.onChange(event); }