Ticket #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: |
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:2 Changed 6 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 6 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.

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:
In the above case, we expect the <b> tag to be removed only, so the <i> must continue valid after it.