mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-17 20:51:20 +02:00
Fix cloneFragment conditional handling of clipboardData.setData (#2298)
Seems the issue was introduced here: dc95ad66a5 (diff-dfb9fbad6106fa548b8335a644d03e49L109)
Remvoing the `return` ended up calling `callback` twice instead of the intended once and both branches being followed
This commit is contained in:
committed by
Ian Storm Taylor
parent
1032d14ffb
commit
416590e1de
@@ -114,6 +114,7 @@ function cloneFragment(event, editor, callback = () => undefined) {
|
||||
event.clipboardData.setData(FRAGMENT, encoded)
|
||||
event.clipboardData.setData(HTML, div.innerHTML)
|
||||
callback()
|
||||
return
|
||||
}
|
||||
|
||||
// COMPAT: For browser that don't support the Clipboard API's setData method,
|
||||
|
Reference in New Issue
Block a user