Skip to content

Commit

Permalink
Constrain from to non-negative numbers (#987)
Browse files Browse the repository at this point in the history
Fix #954
  • Loading branch information
MarcelloTheArcane committed Mar 29, 2021
1 parent ab14704 commit 4f1dfbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/tiptap/src/Plugins/MenuBubble.js
Expand Up @@ -3,7 +3,7 @@ import { Plugin, PluginKey } from 'prosemirror-state'
function textRange(node, from, to) {
const range = document.createRange()
range.setEnd(node, to == null ? node.nodeValue.length : to)
range.setStart(node, from || 0)
range.setStart(node, Math.max(from, 0))
return range
}

Expand Down

0 comments on commit 4f1dfbc

Please sign in to comment.