prosemirror-utils
Advanced tools
Comparing version 0.6.1 to 0.6.2
@@ -526,15 +526,3 @@ 'use strict'; | ||
var dom = domAtPos(position); | ||
var offset = dom.offset; | ||
for (var i = 0, count = dom.node.childNodes.length; i < count; i++) { | ||
var child = dom.node.childNodes[i]; | ||
// ignore decoration DOM nodes as ProseMirror ignores it while calculating the offset | ||
if (child.nodeType === Node.ELEMENT_NODE && (child.getAttribute('class') || '').indexOf('ProseMirror-widget') > -1) { | ||
offset++; | ||
} | ||
if (i > dom.offset) { | ||
break; | ||
} | ||
} | ||
var node = dom.node.childNodes[offset]; | ||
var node = dom.node.childNodes[dom.offset]; | ||
return node ? node : dom.node; | ||
@@ -541,0 +529,0 @@ }; |
{ | ||
"name": "prosemirror-utils", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"description": "Utils library for ProseMirror", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
142795
1291