mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-29 01:50:06 +02:00
fix error when dragging void nodes without selection, closes #757
This commit is contained in:
@@ -9,6 +9,8 @@ import isBackward from 'selection-is-backward'
|
||||
*/
|
||||
|
||||
function scrollToSelection(selection) {
|
||||
if (!selection.anchorNode) return
|
||||
|
||||
const window = getWindow(selection.anchorNode)
|
||||
const backward = isBackward(selection)
|
||||
const range = selection.getRangeAt(0)
|
||||
|
Reference in New Issue
Block a user