We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6501852 commit 3ebea0eCopy full SHA for 3ebea0e
lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
@@ -559,10 +559,12 @@ define([
559
var selection = editor.selection,
560
dom = editor.dom,
561
rng = dom.createRng(),
562
+ doc = editor.getDoc(),
563
markerHtml,
564
marker;
565
- if (!selection.getContent().length) {
566
+ // Validate the range we're trying to fix is contained within the current editors document
567
+ if (!selection.getContent().length && jQuery.contains(doc, selection.getRng().startContainer)) {
568
markerHtml = '<span id="mce_marker" data-mce-type="bookmark">\uFEFF</span>';
569
selection.setContent(markerHtml);
570
marker = dom.get('mce_marker');
0 commit comments