From: Aleksander Ɓukasz Date: Fri, 19 Apr 2013 10:14:25 +0000 (+0200) Subject: Visual editor: fix for browser compatibility X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/6240d0b0afba6964a9ec696a531372822193b767 Visual editor: fix for browser compatibility isSameNode doesn't exist in FF --- diff --git a/modules/visualEditor.js b/modules/visualEditor.js index 70fc435..9cec971 100644 --- a/modules/visualEditor.js +++ b/modules/visualEditor.js @@ -131,7 +131,7 @@ rng.modules.visualEditor = function(sandbox) { view.node.on('change', '.rng-visualEditor-editPaneSelectionForm select', function(e) { var target = $(e.target); var selection = window.getSelection(); - if(selection.anchorNode.isSameNode(selection.focusNode) && selection.anchorNode.nodeType === Node.TEXT_NODE) { + if(selection.anchorNode === selection.focusNode && selection.anchorNode.nodeType === Node.TEXT_NODE) { var startOffset = selection.anchorOffset; var endOffset = selection.focusOffset; if(startOffset > endOffset) {