Opened 15 years ago
Last modified 13 years ago
#5576 confirmed Bug
Elementspath does not work correctly when clicking body
Reported by: | Sa'ar Zac Elias | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.0 |
Keywords: | Cc: |
Description
Steps to reproduce
- Open the demo.
- Put the caret inside one of the table's cells.
- Click 'body' in the elements path.
Notice not only the body is selected, but also 'h1' and 'image'.
Tested with the demo and the current trunk with IE 8.
Change History (4)
comment:1 Changed 13 years ago by
Status: | new → confirmed |
---|---|
Version: | 3.2.1 → 3.0 |
comment:2 Changed 13 years ago by
Keywords: | Discussion added |
---|
That's by design.
Rational:
- CKEditor is context sensitive to the the start boundary of the selection.
- Once we click on "body", the selection start is placed right next to the image.
- CKEditor sees selection next to <img> as an <img> selection, thus considering the image as the start boundary of the selection.
To discuss:
- Is there anything wrong on the above rational?
- What's the expected behavior, which is not described by the reporter?
comment:3 Changed 13 years ago by
I think I can answer that.
The reporter's argument (and others with whom I have consulted) here was that elements path should only show body so as to not confuse the user.
Personally I haven't seen this as a bug - but having two against one would be unwise not to confirm it.
comment:4 Changed 13 years ago by
Keywords: | Discussion removed |
---|
I see it hard to change, if we take the selection code fixing road.
But, we could tweak the elements path plugin, making it stick with the last clicked element until a selection change is not performed. It would be a simpler solution.
CKEditor is showing body and first block element and its contents.
In this case the elements path is showing "body h1 img". With a sample text CKEditor will show "body p". With the code below:
it will show "body div div p span"
It has been working that way in all browsers from CKEditor 3.0.