Opened 10 years ago

Closed 10 years ago

#9949 closed defect (fixed)

dijit.Editor throws errors on FF3 if Editor is hidden in accordian pane on startup

Reported by: Jared Jurkiewicz Owned by: Jared Jurkiewicz
Priority: high Milestone: 1.4
Component: Editor Version: 1.3.2
Keywords: Cc:
Blocked By: Blocking:

Description

dijit.Editor throws errors on FF3 if Editor is hidden in accordian pane on startup

This can easily be seen with:

http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/editor/tests/editorPrettyPrint.html

When it loads.

This is because since the doc is hidden, the queryCommand* functions all fail (throw exception).

Easy fix for this is to squetch the errors, as the queryCommands all rerun when it's brought into view, clicked on, etc, anyway.

Patch forthhcoming.

Bill, You okay with this?

Attachments (1)

squelchError.patch (1.2 KB) - added by Jared Jurkiewicz 10 years ago.
Simple patch.

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by Jared Jurkiewicz

Attachment: squelchError.patch added

Simple patch.

comment:1 Changed 10 years ago by bill

Owner: changed from bill to Jared Jurkiewicz

I'm OK with it although the alternative is that when the Editor is the child of a layout container, to defer running that initialization code until the editor is shown (at which point Editor.resize() gets called).

var parent = dijit._Contained.prototype.getParent.call(this);
if(parent && parent.isLayoutContainer){
   // i'm the child of a layout widget....
   // defer initialization until resize() is called
   ...
}

You said those methods are all rerun when the editor is brought into view? How does the editor detect being brought into view?

comment:2 Changed 10 years ago by Jared Jurkiewicz

Milestone: tbd1.4

comment:3 Changed 10 years ago by Jared Jurkiewicz

Any clicks on editor generate a onNormalizedDisplayChange event, and that drives a state checking of all the icons. so any interactions with the editor drive it rechecking what should (or shouldn't) be enabled.

comment:4 Changed 10 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

(In [20223]) Minor tweak to editor, fixes FF3 corner case on errors thrown when hidden. \!strict fixes #9949

Note: See TracTickets for help on using tickets.