Opened 8 years ago
Closed 7 years ago
#17066 closed Bug (fixed)
Table seleciton causes exception on a pasted table in certain scenario
Reported by: | Marek Lewandowski | Owned by: | |
---|---|---|---|
Priority: | Must have (possibly next milestone) | Milestone: | CKEditor 4.7.1 |
Component: | General | Version: | 4.7.0 |
Keywords: | Cc: |
Description
This issue is reproducible on our Document Editor demo. I wasn't able to repro it on a regular sample.
Maybe the fact that the editor is placed into a DOM dynamically has something to do?
- Go to Document Editor demo.
- Make a partial selectiom on the table, say 2x3 cell
- Copy to clipboard.
- Move selection into another paragraph.
- Paste.
- Try to make table seleciton on a pasted table.
Expected
Our custom selection is being made.
Actual
Exception is thrown:
ckeditor.js?oqkjc5:66 Uncaught TypeError: Cannot read property 'ownerDocument' of undefined at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.dom.element.getDocument (ckeditor.js?oqkjc5:66) at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.dom.element.getDocumentPosition (ckeditor.js?oqkjc5:108) at b (ckeditor.js?oqkjc5:1220) at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.dom.document.<anonymous> (ckeditor.js?oqkjc5:1227) at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.dom.document.c (ckeditor.js?oqkjc5:11) at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.dom.document.window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.event.CKEDITOR.event.fire (ckeditor.js?oqkjc5:13) at HTMLDocument.<anonymous> (ckeditor.js?oqkjc5:58)
Additional Information
I was able to reproduce it on Chrome, and Edge. Most likely it's reproducible on other browsers too.
Change History (9)
comment:1 Changed 8 years ago by
comment:2 Changed 8 years ago by
I was also unable to reproduce it on regular sample even with identical config and build version.
comment:3 follow-up: 4 Changed 8 years ago by
@k.krzton it might be related to the fact that that the editor on demo is attached at runtime. Worth checking out.
comment:4 Changed 8 years ago by
Replying to m.lewandowski:
@k.krzton it might be related to the fact that that the editor on demo is attached at runtime. Worth checking out.
That might be the case, checking now.
comment:5 Changed 8 years ago by
It is somehow strange, I run the website locally and used dev version and build version (based on major) with same config and styles and error does not occur then. It occurs only with bundled version. I will check how different are those two builds.
comment:6 Changed 8 years ago by
Ok, editor for website is built from the special preset https://github.com/ckeditor/ckeditor-presets/blob/demo/presets/demo-build-config.js on which the error is reproducible.
comment:7 Changed 8 years ago by
The minimal set of plugins to reproduce the issue:
config.plugins = 'table,' + 'tableresize,' + 'tableselection,' + 'toolbar,' + 'wysiwygarea';
Look like the issue with tablerezise
plugin.
comment:8 Changed 8 years ago by
Status: | new → confirmed |
---|
comment:9 Changed 7 years ago by
Resolution: | → fixed |
---|---|
Status: | confirmed → closed |
I got the error on hover over pasted table without selecting. It only happens if table is copied with header row.