Opened 11 years ago
Closed 11 years ago
#10857 closed Bug (fixed)
MathJax widget [FF,IE9] - clipboard totally broken
Reported by: | Olek Nowodziński | Owned by: | Piotr Jasiun |
---|---|---|---|
Priority: | Must have (possibly next milestone) | Milestone: | CKEditor 4.3 |
Component: | Core : Pasting | Version: | 4.3 Beta |
Keywords: | Cc: |
Description
- Open http://ckeditor4.t/ckeditor/samples/plugins/mathjax/mathjax.html
- Select a widget
- C-x.
- Put caret anywhere you want.
- C-v.
FF: empty widget is pasted
IE9: error in console + broken widget:
SCRIPT16389: Unspecified error. selection.js, line 1958 character 6
Change History (12)
comment:1 follow-up: 5 Changed 11 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 11 years ago by
Error SCRIPT16389 is also mentioned in #10796. Perhaps fixing one issue will fix another.
comment:3 Changed 11 years ago by
Priority: | Normal → High |
---|
comment:4 Changed 11 years ago by
Owner: | set to Piotr Jasiun |
---|---|
Status: | confirmed → assigned |
comment:5 Changed 11 years ago by
Replying to Reinmar:
IE's issue may be caused by #10812.(Update: no, it's not)FF's by #10841.
Nope. It's not.
The problem is more complex, because iframe is removed during copy even in pure contenteditable (without CKE). What I can do is recreate it but to do this I need to have pasted event
on widget.
Moreover surrounding span
is removed by data processor because it has no content, after firefox removed iframe. The problem is that this span
keep TeX in the attribute. I think that data processor should not remove empty elements if they have "data" attributes.
comment:6 Changed 11 years ago by
On IE 9 problem is similar. When you copy iFrame in contenteditable
in IE 9 iframe
element is not removed but its content is, so you get iFrame without content. One solution can fix both problems (FF and IE) but I need paste event in widget and data processor modification.
comment:7 Changed 11 years ago by
The iframe is not a problem. You should be able recreate it in widget#init or even inside a data processor (remember that to process non-editable content you have to use special addRules option).
The second problem, with empty span being removed can, most likely, be solved easily too. Just fill that span holding iframe with a zero width space or some element with content and width set to 0px. ZWS will be the best solution if it'll work.
comment:8 Changed 11 years ago by
Widget#ini is not called on FF & IE9 in my case. Maybe widget#paste method would be useful for someone else? It seems to be more elegant solution than adding rules to data processor to recreate iframe.
About second problem: I can create some workaround but maybe keeping elements with data
attribute is what we should do in general? And what with special attribute to tell data processor to keep this element, we were talking about couple weeks ago?
comment:9 Changed 11 years ago by
Status: | assigned → review |
---|
Fixed.
It looks like IE9 have also problem with setting range on iframe, because it was the reason of the problem on that browser. Anyway:
I'm removing iframe on the paste
event to have the same situation in all browsers and then insert in init
method. I also created an attribute: data-cke-survive
to prevent removing empty span element in data processor.
- dev: t/10937
- tests t/10937
comment:10 Changed 11 years ago by
comment:11 Changed 11 years ago by
Status: | review → assigned |
---|
comment:12 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
- git:95bd2fe
- tests:b802386
IE's issue may be caused by #10812.(Update: not, it's not)FF's by #10841.