From 6240d0b0afba6964a9ec696a531372822193b767 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Fri, 19 Apr 2013 12:14:25 +0200 Subject: [PATCH] Visual editor: fix for browser compatibility isSameNode doesn't exist in FF --- modules/visualEditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.20.1