Opened 8 years ago
Last modified 8 years ago
#16618 review_failed Bug
[IE11][FF][CF] Styling could not be reapplied on a simple click
Reported by: | kkrzton | Owned by: | kkrzton |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.7.1 |
Component: | General | Version: | 4.6.0 |
Keywords: | Cc: |
Description (last modified by )
Steps to reproduce
Can be easily reproduced on /tests/plugins/copyformatting/manual/safaricolor
(for both editors).
- Put caret inside first paragraph e.g.
Text witho^ut any format
. - Click
Copy Formatting
button. - Click on the last word (Orange) inside last paragraph (styling will be removed).
- Click on the still styled word inside same paragraph e.g.
Text with Bac^kground Colour Orange
. - Click
Copy Formatting
button. - Click on the last word (Orange) inside last paragraph.
Expected result
On the second click styling should be copied, so word Orange should be styled same as rest of the paragraph.
Actual result
On the second click, styling is not applied.
Other details (browser, OS, CKEditor version, installed plugins)
IE11, FF (Chrome works as expected).
Change History (14)
comment:1 Changed 8 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 8 years ago by
Description: | modified (diff) |
---|---|
Summary: | [IE11][CF] Styling could not be reapplied on a simple click → [IE11][FF][CF] Styling could not be reapplied on a simple click |
comment:3 Changed 8 years ago by
Milestone: | → CKEditor 4.6.1 |
---|
comment:4 Changed 8 years ago by
Owner: | set to kkrzton |
---|---|
Status: | confirmed → assigned |
comment:5 Changed 8 years ago by
comment:8 Changed 8 years ago by
Status: | assigned → review |
---|
Pushed fix to t/16618 branch.
The code assumed that every (every used in a particular method) element node has a text child which was false for e.g. br
nodes. I added an additional check.
comment:9 Changed 8 years ago by
Priority: | Normal → Must have (possibly next milestone) |
---|---|
Status: | review → review_failed |
The fix is not working correctly. It works only for empty span + br
at the boundary of p
. If the sentence is not inside paragraph, the plugin apply formatting to the wrong word.
Also only test applyFormat ending with empty span and br - #16618
really fails after disabling the fix.
Additionally test applyFormat ending with br - #16618
passes even after disabling fix in FF.
comment:10 Changed 8 years ago by
Priority: | Must have (possibly next milestone) → Normal |
---|
comment:11 Changed 8 years ago by
I can see that the fix does not work for some specific cases mentioned above.
Pushed additional tests covering those cases. Did some tests refactoring - now all tests but 2 fails on Firefox. These 2 tests just covers before untested case with space between text node and empty elements.
comment:12 Changed 8 years ago by
Milestone: | CKEditor 4.6.1 → CKEditor 4.6.2 |
---|
Let's focus on bringing it into 4.6.2.
comment:13 Changed 8 years ago by
Milestone: | CKEditor 4.6.2 → CKEditor 4.7.0 |
---|
comment:14 Changed 8 years ago by
Milestone: | CKEditor 4.7.0 → CKEditor 4.7.1 |
---|
Applying styles for the first time (step 3) produces html like (on Firefox):
In other browsers there is only empty span on the end, here is additional
<br>
. Those two empty elements causes some error in_getSelectedWordOffset
function. With one empty element on the end, it works fine.