Ticket #1270 (closed Bug: fixed)

Opened 7 years ago

Last modified 7 years ago

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:

Description

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):

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

After:
   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

comment:1 Changed 7 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:

Before:
   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 7 years ago by fredck

Another case:

Before:
    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 7 years ago by fredck

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

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

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