Opened 16 years ago
Closed 16 years ago
#3708 closed Bug (duplicate)
[webkit] inline style doesn't work for collpased range
Reported by: | Garry Yao | Owned by: | Garry Yao |
---|---|---|---|
Priority: | Must have (possibly next milestone) | Milestone: | CKEditor 3.0 |
Component: | General | Version: | |
Keywords: | Webkit Confirmed HasPatch | Cc: |
Description
Reproducing Procedures
- Open the replace by class example page in Safari4;
- Click inside the text line to result in a collapsed the selection;
- Click on any inline style button, e.g. Bold.
- Actual Result: Style tag is not happened at the selection position.
Attachments (2)
Change History (7)
Changed 16 years ago by
Attachment: | 3708.patch added |
---|
comment:1 Changed 16 years ago by
Keywords: | Review? added |
---|---|
Status: | new → assigned |
comment:2 Changed 16 years ago by
Keywords: | Review- added; Review? removed |
---|
The patch doesn't work with this case:
Reproducing Procedures
- Open the replace by class example page in Safari4;
- Click inside the text line to result in a collapsed the selection;
- Press 'Ctrl-B', then Press 'Ctrl-I';
- Actual Result: Both styles don't open.
comment:3 Changed 16 years ago by
Keywords: | Review? added; Review- removed |
---|
The key detection logic in previous patch is possibly be confused by shortcut keys like Ctrl-I, so I found a smarter way to check it:
We just need to check if the subsequent keystroke has actually result in any new character within the style.
I'm attaching a new patch following this approach.
Changed 16 years ago by
Attachment: | 3708_2.patch added |
---|
comment:4 Changed 16 years ago by
Keywords: | HasPatch added; Review? removed |
---|
comment:5 Changed 16 years ago by
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
I understand this is an important issue, but any fix we may propose for it is prone to be broken on special cases. We have several key combinations to caret movements, as well as the possibility of having more than one style being applied at the same time (CTRL+B + CTRL+I) or even clipboard operations being activated on different ways. I mean, it's quite easy to have any fix at our side being broken.
We have been in touch with Apple for this issue. They have demonstrated interest on fixing webkit (this is an engine bug actually), but they have brought not much more than this. Hopefully we'll have something real coming from them soon.
In any case, this is a DUP of #1272.
Actually the style element has been introduced, but the culprit is webkit doesn't allow selection inside the empty element, so after you begin to type, texts fall into the outside of the style.
The idea of this patch is providing a workaround to padding a bogus node (ZWNBSP) to make the selection anchored inside the element and remove the bogus node on next user action.