mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-10 17:24:02 +02:00
Fix mismatched event parameter. (#694)
This commit is contained in:
committed by
Ian Storm Taylor
parent
f80951ab82
commit
8a81d73ec1
@@ -105,7 +105,7 @@ function Plugin(options = {}) {
|
|||||||
// is replaced. But the `select` event for this change doesn't fire until after
|
// is replaced. But the `select` event for this change doesn't fire until after
|
||||||
// the `beforeInput` event, even though the native selection is updated. So we
|
// the `beforeInput` event, even though the native selection is updated. So we
|
||||||
// need to manually adjust the selection to be in sync. (03/18/2017)
|
// need to manually adjust the selection to be in sync. (03/18/2017)
|
||||||
const window = getWindow(event.target)
|
const window = getWindow(e.target)
|
||||||
const native = window.getSelection()
|
const native = window.getSelection()
|
||||||
const { anchorNode, anchorOffset, focusNode, focusOffset } = native
|
const { anchorNode, anchorOffset, focusNode, focusOffset } = native
|
||||||
const anchorPoint = getPoint(anchorNode, anchorOffset, state, editor)
|
const anchorPoint = getPoint(anchorNode, anchorOffset, state, editor)
|
||||||
|
Reference in New Issue
Block a user