mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-13 18:53:59 +02:00
fix isInContentEditable logic to match children
This commit is contained in:
@@ -163,8 +163,12 @@ class Content extends React.Component {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
isInContentEditable = (event) => {
|
isInContentEditable = (event) => {
|
||||||
|
const { element } = this
|
||||||
const { target } = event
|
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