#1370 closed defect (fixed)
Editor2 (this.contextMenu) destroy error/bug
Reported by: | Owned by: | liucougar | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Widgets | Version: | 0.3 |
Keywords: | Editor2, Editor2Plugin, ContextMenu | Cc: | [email protected]… |
Blocked By: | Blocking: |
Description
In srcwidgetEditor2PluginContextMenu.js, I get this error that this.contextMenu is undefined in both IE and Firefox.
I've attach the patch below. I don't know the reason behind disposing this.contextMenu so it might not be the best way to do it. Because contextMenu is never created or was destroyed somewhere already?
To recreate:
- visit http://archive.dojotoolkit.org/nightly/tests/widget/test_Editor2.html
- click button "clobber the editor"
Note:
In IE: must have script debugging enabled. In FF: view javascript console.
--- Patch Index: ContextMenu?.js =================================================================== --- ContextMenu?.js (revision 5435) +++ ContextMenu?.js (working copy) @@ -90,8 +90,11 @@
this.editor.unregisterLoadedPlugin(this); delete this.groups; delete this.separators;
- this.contextMenu.destroy();
- delete this.contextMenu;
+ if (this.contextMenu) + { + this.contextMenu.destroy(); + delete this.contextMenu; + }
}
});
Attachments (1)
Change History (4)
Changed 15 years ago by
Attachment: | Editor2Plugin_ContextMenu.patch added |
---|
comment:1 Changed 15 years ago by
Cc: | [email protected]… added |
---|---|
Owner: | changed from bill to liucougar |
Version: | 0.4 → 0.3 |
comment:2 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [5440]) fixes #1370: Editor2 (this.contextMenu) destroy error/bug fix: plugins and editor2toolbar are destroyed twice fix: after closing of editor2, the original textarea should be shown