X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/732fe46593ff27a62c6f64f3d495c3d5619ece1c..6c81c82481a5407bc6e4f3c5cdd16baedbc2a523:/src/redakcja/static/js/wiki/caret.js?ds=sidebyside diff --git a/src/redakcja/static/js/wiki/caret.js b/src/redakcja/static/js/wiki/caret.js index 7026e2f5..b2cf1826 100644 --- a/src/redakcja/static/js/wiki/caret.js +++ b/src/redakcja/static/js/wiki/caret.js @@ -30,7 +30,7 @@ class Caret { if (!selection.isCollapsed) return; var anchorNode = selection.anchorNode; // Is selection still inside a node? - if (!$(anchorNode).closest('[x-node]')) return; + if (!$(anchorNode).closest('[x-node]').length) return; self.singleClick = true; setTimeout(function() {