We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 373d654 commit 59962feCopy full SHA for 59962fe
src/create-default-behavior.js
@@ -149,9 +149,10 @@ export default function createDefaultBehavior (editable) {
149
},
150
151
paste (element, blocks, cursor) {
152
- cursor.insertBefore(blocks[0])
+ if (blocks.length === 0) return
153
154
- if (blocks.length <= 1) return cursor.setVisibleSelection()
+ cursor.insertBefore(blocks.shift())
155
+ if (blocks.length === 0) return cursor.setVisibleSelection()
156
157
var parent = element.parentNode
158
var currentElement = element
0 commit comments