Opened 11 years ago
Last modified 11 years ago
#11770 confirmed Bug
Destroying an editor while a widget is selected causes JS error in IE
Reported by: | ross pace | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | UI : Widgets | Version: | 4.3 |
Keywords: | Cc: |
Description
I am using IE 11 and an inline editor. If you add a widget, such as the demo simplebox widget, and while it is selected you destroy the editor (such as the user clicking a cancel button that removes the editor function) there is a JS error.
The JS error occurs while trying to remove expand attributes. In plugin.js on line 211 it calls contents.replace( /\s+data-cke-expando=".*?"/g, ) but in this situation contents is a Boolean value equal to true so it throws the exception that there is no replace function for that value.
It appears that the code expects editor the getSnapshot to return a string but a Boolean is being returned instead. Looking at event.js it appears true is returned when an event call returns undefined.
Change History (3)
comment:1 Changed 11 years ago by
Version: | 4.2.1 → 4.3.4 |
---|
comment:2 Changed 11 years ago by
comment:3 Changed 11 years ago by
Status: | new → confirmed |
---|---|
Version: | 4.3.4 → 4.3 |
Interesting case. I can confirm it on IE11, couldn't on Chrome.
TC:
/plugins/image2/dev/image2.html
The call stack is pretty complex though. Perhaps editor tries to unlock selection after the editor is already dead.