Opened 9 years ago
Last modified 8 years ago
#13332 review Bug
IE: collapsed selection doesn't match styling.
Reported by: | Jakub Ś | Owned by: | Tade0 |
---|---|---|---|
Priority: | Nice to have (we want to work on it) | Milestone: | |
Component: | General | Version: | 4.0 |
Keywords: | IE | Cc: |
Description (last modified by )
Problem can be reproduced from CKEditor 4.0 (works fine in 4.0 beta) in IE9-11.
To reproduce for inline styles:
- Create a paragraph and enter text, say "This is plain text"
- Select whole paragraph and apply Bold
- Click once inside paragraph and try to apply any inline style from styles dropdown.
Result: In IE, the inline style gets applied to whole paragraph even when text was not selected after clicking once.
To reproduce for block styles:
- Create 3 paragraphs of text
- Select them all with a mouse and apply "Italic Title" from styles dropdown.
- Click at the end of second element (behind it actually)
- Apply "Special Container" style
Result: all paragraphs get styled while only should be changed.
NOTE: This issue has been reported on our support channel. User claims that the range.collapsed property returns false in IE whereas in e.g Chrome it returns true.
Attachments (2)
Change History (16)
comment:1 Changed 9 years ago by
Status: | new → confirmed |
---|
Changed 9 years ago by
Attachment: | 2015-05-28_1525.swf added |
---|
comment:2 Changed 9 years ago by
Description: | modified (diff) |
---|---|
Summary: | IE: collapsed selection and inline style exchange wrapping inline element. → IE: collapsed selection doesn't match styling. |
Changed 9 years ago by
Attachment: | 2015-11-19_1643.swf added |
---|
comment:3 Changed 9 years ago by
Milestone: | → CKEditor 4.5.6 |
---|
comment:4 Changed 9 years ago by
Owner: | set to Tade0 |
---|---|
Status: | confirmed → assigned |
comment:6 Changed 9 years ago by
Status: | assigned → review |
---|
One solution that I found and implemented was to update the lastSel
variable - the last selection saved before blurring - on mousedown.
Changes pushed to branch:t/13332.
comment:7 Changed 9 years ago by
Milestone: | CKEditor 4.5.6 → CKEditor 4.5.7 |
---|
comment:8 Changed 9 years ago by
Milestone: | CKEditor 4.5.7 → CKEditor 4.5.8 |
---|
comment:9 Changed 9 years ago by
Milestone: | CKEditor 4.5.8 → CKEditor 4.5.9 |
---|
comment:10 Changed 9 years ago by
Milestone: | CKEditor 4.5.9 → CKEditor 4.5.10 |
---|
comment:11 Changed 8 years ago by
Milestone: | CKEditor 4.5.10 → CKEditor 4.5.11 |
---|
Moving tickets to the next milestone.
comment:12 Changed 8 years ago by
Milestone: | CKEditor 4.5.11 → CKEditor 4.6.1 |
---|
comment:13 Changed 8 years ago by
Milestone: | CKEditor 4.6.1 → CKEditor 4.6.2 |
---|
Moving to 4.6.2 minor release, as 4.6.1 is mostly about polishing 4.6.0.
comment:14 Changed 8 years ago by
Milestone: | CKEditor 4.6.2 |
---|---|
Priority: | Normal → Nice to have (we want to work on it) |
The problem here lies is the fact, that the selection is locked when the style is applied, but unlocked only when the editor regains focus, which means it has to be lost earlier for the unlock to work. This is not the case here, hence the bug.
This bug doesn't occur in Chrome/Firefox, because there's no locking/unlocking happening in these browsers.
Edit: When a combo box is selected the focus is lost in IE, but not in any other browser.