Changes between Initial Version and Version 1 of Ticket #6152, comment 18


Ignore:
Timestamp:
Apr 28, 2011, 7:12:24 PM (8 years ago)
Author:
dchill42
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6152, comment 18

    initial v1  
    1 This bug continues to be an issue in 3.5.1. When enterMode is set to CKEDITOR.ENTER_BR, and the editor loads with content, the first node of which is text (as opposed to a tag like <p>), body.getFirst().hasAttribute() is undefined. This is because getFirst() returns the text node, which does not have a hasAttribute() method.
     1This bug continues to be an issue in 3.5.2. When enterMode is set to CKEDITOR.ENTER_BR, and the editor loads with content, the first node of which is text (as opposed to a tag like <p>), body.getFirst().hasAttribute() is undefined. This is because getFirst() returns the text node, which does not have a hasAttribute() method. The offending code is in the activateEditing() function of the wysiwygarea plugin.
    22
    3 The previously posted patch also has a logic flaw, at least in newer version. It runs the code block, which is ostensibly meant to remove the bogus node inserted by firebug. In the scenario described above, this results in the removal of the first text node from the editor. Instead, the test should be body.getFirst().hasAttribute && body.getFirst().hasAttribute('_moz_editor_bogus_node')
     3The previously posted patch also has a logic flaw, at least in newer versions. It runs the code block, which is ostensibly meant to remove the bogus node inserted by firebug. In the scenario described above, this results in the removal of the first text node from the editor. Instead, the test should be
     4{{{
     5(bodyChildsNum == 1 && body.getFirst().hasAttribute && body.getFirst().hasAttribute('_moz_editor_bogus_node'))
     6}}}
     7such that the node isn't tested for the obviously absent attribute on a text node, nor is the text node inadvertently removed.
    48
    5 I will attach a new patch with this fix in the hopes that it will get incorporated into the next release.
     9I will attach a new patch with this fix in the hope that it will get incorporated into the next release.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy