1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-13 11:44:55 +01:00

fix duplicate declaration

This commit is contained in:
Ian Storm Taylor 2017-10-27 09:03:03 -07:00
parent 44b3c8c30c
commit d4eec124d8

View File

@ -373,10 +373,10 @@ function AfterPlugin() {
// has fired in a node: https://github.com/facebook/react/issues/11379.
// Until this is fixed in React, we dispatch a mouseup event on that
// DOM node, since that will make it go back to normal.
const node = document.getNode(target.focusKey)
const el = findDOMNode(node)
const focusNode = document.getNode(target.focusKey)
const el = findDOMNode(focusNode)
if (!el) return
el.dispatchEvent(new MouseEvent('mouseup', {
view: window,
bubbles: true,