Opened 14 years ago
Last modified 14 years ago
#5986 confirmed New Feature
Join links when joining block elements with DEL or BACKSPACE
Reported by: | Jude Allred | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.0 |
Keywords: | Cc: |
Description (last modified by )
- go to ckeditor.com/demo
- set the 'source' to
<p> <a href="foo">I am a link</a></p>
- return to wysiwyg mode
- place the cursor immediately before the 'l' in 'link'
- press enter
- press backspace
- view source
[expected]: The source is relatively unaltered: there's only one link.
[actual] there are two links:
<p> <a href="foo">I am a </a><a href="foo">link</a></p>
Some more info: Pressing 'enter' the first time breaks the links apart. I would consider this a bug, but the behavior is somewhat reasonable. Pressing 'backspace' removes the break and the links are now adjacent. The expected behavior here is that the links have rejoined, since the "backspace" logically has undone the action of pressing "enter".
Change History (2)
comment:1 Changed 14 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 14 years ago by
Status: | new → confirmed |
---|---|
Summary: | paragraph break inside link creates 2 links; deleting paragraph break does not join them. → Join links when joining block elements with DEL or BACKSPACE |
Type: | Bug → New Feature |
Version: | → 3.0 |
Replying to Jude Allred:
There is no way to represent a single link among two different paragraphs in HTML. No bug here.
No, the backspace didn't undo anything. It simply deletes what we have before the caret (the line break in this case). As we have two separate links, it's normal to have them adjacent to each other. So, the reported result is definitely expected.
We could instead consider having a new feature here, which would join links if their attributes match, when joining block elements.