Make WordPress Core

Ticket #30463: 30463.patch

File 30463.patch, 650 bytes (added by tyxla, 9 years ago)

Completely agree with @azaozz for the browser dependancy of the issue. This one seems to fix the issue - when removing the range style we're making sure that the proper node is set for startContainer when dealing with a text node.

  • wp-includes/js/tinymce/tinymce.js

     
    1678416784                                        }
    1678516785
    1678616786                                        // Update range positions since they might have changed after the split operations
    16787                                         rng.startContainer = startContainer.parentNode;
     16787                                        rng.startContainer = startContainer.parentNode ? startContainer.parentNode : startContainer;
    1678816788                                        rng.startOffset = nodeIndex(startContainer);
    1678916789                                        rng.endContainer = endContainer.parentNode;
    1679016790                                        rng.endOffset = nodeIndex(endContainer) + 1;