fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
smartxml: Fixing Document.containsNode
[fnpeditor.git]
/
src
/
smartxml
/
smartxml.js
diff --git
a/src/smartxml/smartxml.js
b/src/smartxml/smartxml.js
index
a357977
..
6e754de
100644
(file)
--- a/
src/smartxml/smartxml.js
+++ b/
src/smartxml/smartxml.js
@@
-358,7
+358,7
@@
$.extend(Document.prototype, Backbone.Events, {
},
containsNode: function(node) {
- return
node._$.parents().index(this.root._$) !== -1
;
+ return
this.root && (node.nativeNode === this.root.nativeNode || node._$.parents().index(this.root._$) !== -1)
;
},
wrapNodes: function(params) {