mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-09-01 19:22:35 +02:00
fix: chromium interrupt ime (#5736)
This commit is contained in:
@@ -220,6 +220,9 @@ const Mention = ({ attributes, children, element }) => {
|
||||
data-cy={`mention-${element.character.replace(' ', '-')}`}
|
||||
style={style}
|
||||
>
|
||||
{/* Prevent Chromium from interrupting IME when moving the cursor */}
|
||||
{/* 1. span + inline-block 2. div + contenteditable=false */}
|
||||
<div contentEditable={false}>
|
||||
{IS_MAC ? (
|
||||
// Mac OS IME https://github.com/ianstormtaylor/slate/issues/3490
|
||||
<Fragment>
|
||||
@@ -232,6 +235,7 @@ const Mention = ({ attributes, children, element }) => {
|
||||
{children}
|
||||
</Fragment>
|
||||
)}
|
||||
</div>
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
@@ -242,6 +242,9 @@ const Mention = ({ attributes, children, element }) => {
|
||||
data-cy={`mention-${element.character.replace(' ', '-')}`}
|
||||
style={style}
|
||||
>
|
||||
{/* Prevent Chromium from interrupting IME when moving the cursor */}
|
||||
{/* 1. span + inline-block 2. div + contenteditable=false */}
|
||||
<div contentEditable={false}>
|
||||
{IS_MAC ? (
|
||||
// Mac OS IME https://github.com/ianstormtaylor/slate/issues/3490
|
||||
<Fragment>
|
||||
@@ -254,6 +257,7 @@ const Mention = ({ attributes, children, element }) => {
|
||||
{children}
|
||||
</Fragment>
|
||||
)}
|
||||
</div>
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user