Opened 10 years ago

Closed 10 years ago

#1270 closed Bug (fixed)

Style should not be removed from collapsed selection on element boundary

Reported by: fredck Owned by:
Priority: Normal Milestone: FCKeditor 2.5 Beta
Component: Core : Styles Version: SVN (FCKeditor) - Retired
Keywords: Confirmed Cc:


If the selection is collapsed in the one of the boundaries of a style element, the element must not be removed when removing the style.

For example, today we have the following behavior when removing a <b> style (where "|" represents the selection):

   This is some <b>styles|</b> text.

   This is some styles| text.

The expected result is the following instead:

   This is some <b>styles</b>| text.

The style is simply moved outside the element. The same behavior is expected if the collapsed selection is placed at the beginning of the element.

Change History (3)

comment:1 Changed 10 years ago by fredck

Things are not easy as they seam to be. The following is an example to be considered. Here again, we are removing a <b> style:

   This is some <b><i>styles|</i></b> text.

Expected result:
   This is some <b><i>styles</i></b><i>|</i> text.

In the above case, we expect the <b> tag to be removed only, so the <i> must continue valid after it.

comment:2 Changed 10 years ago by fredck

Another case:

    This is some <strong><bold><span><b><i>styles|</i></b></span></bold> text</strong>.

Expected result:
    This is some <bold><span><b><i>styles</i></b></span></bold><span><i>|</i></span> text.

Supposing that it exists a <bold> element, and that the <b> style overrides both <bold> and <strong>.

comment:3 Changed 10 years ago by fredck

  • Resolution set to fixed
  • Status changed from new to closed

Fixed with [865]. Click here for more info about our SVN system.

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy