Opened 17 years ago

Closed 17 years ago

#1270 closed Bug (fixed)

Style should not be removed from collapsed selection on element boundary

Reported by: Frederico Caldeira Knabben 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 (3)

comment:1 Changed 17 years ago by Frederico Caldeira Knabben

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 17 years ago by Frederico Caldeira Knabben

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 17 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy