Opened 9 years ago
Last modified 9 years ago
#14911 pending Bug
Table cell lose formatting on tab switch an new text
| Reported by: | Philipp Scheler | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | General | Version: | |
| Keywords: | Cc: |
Description
Steps to reproduce
- Create a table in ckeditor with 4 columns.
- Insert text in the cells of the the first row. (formatting: bold)
- Put cursor in the first cell in the first row and switch with tab to the next cell.
- Type in new text to overwrite the selected text.
Expected result
The new text has the same formatting (bold) like the text before.
Actual result
In Firefox and sometimes in IE the text lost the formatting. In Chrome not.
Other details (browser, OS, CKEditor version, installed plugins)
Browser: Firefox 45.3.0, Internet Explorer 11, Chrome 53
Attachments (2)
Change History (3)
Changed 9 years ago by
| Attachment: | CKEditorTableBeforeTabSwitch.PNG added |
|---|
Changed 9 years ago by
| Attachment: | CKEditorTableAfterTabSwitch.PNG added |
|---|
Table after switching with tab to next cells and type new text.
comment:1 Changed 9 years ago by
| Keywords: | CkEditor cell table formatting removed |
|---|---|
| Status: | new → pending |
| Version: | 4.5.11 |
Problem can be reproduced from CKEditor 4.0 but I'm not sure if it can be treated as such because it all comes down to browsers handling selection differently.
If you click inside first cell, press tab and then execute CKEDITOR.instances.editor1.getSelection(), you will see inside _.cache.nativeSel that in Chrome focusNode is text while in Firefox the focusNode is td element.
I think this is something should not and actually don't want to change in anyway mainly because it is almost impossible to guess what user intentions where (I'm not talking about this specific case but all similar cases in general).
What do you think @m.lewandowski?
UPDATE: We can get to native selection in a easier way which is by executing editor.getSelection().getNative();.

Table header before switching with tab.