From d2be20f1907dedc8dcedfd90b7f8d9948af25883 Mon Sep 17 00:00:00 2001 From: Sinclair Chen Date: Fri, 5 Aug 2022 09:59:47 -0700 Subject: [PATCH] Fix typing after being weird on Android Issue: character from mention gets deleted. Most weird on Swiftkey: mention gets duplicated instead of deleting. See https://github.com/ProseMirror/prosemirror/issues/565 https://bugs.chromium.org/p/chromium/issues/detail?id=612446 The keyboard still closes unexpectedly when you delete :( --- web/components/editor/mention.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/components/editor/mention.tsx b/web/components/editor/mention.tsx index 3ad5de39..5ccea6f5 100644 --- a/web/components/editor/mention.tsx +++ b/web/components/editor/mention.tsx @@ -11,7 +11,7 @@ const name = 'mention-component' const MentionComponent = (props: any) => { return ( - + ) @@ -25,5 +25,6 @@ const MentionComponent = (props: any) => { export const DisplayMention = Mention.extend({ parseHTML: () => [{ tag: name }], renderHTML: ({ HTMLAttributes }) => [name, mergeAttributes(HTMLAttributes)], - addNodeView: () => ReactNodeViewRenderer(MentionComponent), + addNodeView: () => + ReactNodeViewRenderer(MentionComponent, { className: 'inline-block' }), })