mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-13 02:34:05 +02:00
fix isInContentEditable logic to match children
This commit is contained in:
@@ -163,8 +163,12 @@ class Content extends React.Component {
|
||||
*/
|
||||
|
||||
isInContentEditable = (event) => {
|
||||
const { element } = this
|
||||
const { target } = event
|
||||
return target.isContentEditable && target === this.element
|
||||
return (
|
||||
(target.isContentEditable) &&
|
||||
(target === element || target.closest('[contenteditable]') == element)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user