mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-16 20:24:01 +02:00
this.element
might be null
when the callback is executed (#1489)
This commit is contained in:
committed by
Ian Storm Taylor
parent
6f5f2db271
commit
02c4837d4c
@@ -228,7 +228,7 @@ class Content extends React.Component {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// COMPAT: In Firefox, it's not enough to create a range, you also need to
|
// COMPAT: In Firefox, it's not enough to create a range, you also need to
|
||||||
// focus the contenteditable element too. (2016/11/16)
|
// focus the contenteditable element too. (2016/11/16)
|
||||||
if (IS_FIREFOX) this.element.focus()
|
if (IS_FIREFOX && this.element) this.element.focus()
|
||||||
this.tmp.isUpdatingSelection = false
|
this.tmp.isUpdatingSelection = false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user