Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#11899 closed defect (fixed)

dijit.Editor Firefox: occasional javascript errors after selecting editor and hiding the editor window

Reported by: philip Owned by:
Priority: high Milestone: 1.6
Component: Editor Version: 1.5
Keywords: dijit.Editor Firefox Cc:
Blocked By: Blocking:

Description

I do not have a reproducible test case. On occasion, if you click in the editor window and then make the editor invisible, a javascript error is generated in Firefox. I managed to get a Firebug stack trace using a local uncompressed 1.5.0 version of dojo.

To improve the chances of getting this error, I clean the Firefox cache and then stop/start Firefox. When I load an example that uses the dijit.Editor, I click in the editor window and then click on a button that hides the window.

Stack trace:

s is null

style(Object { name="node"}, Object { name="style"}, Object { name="value"})dojo.js.uncompressed.js (line 5878)

_setStateClass()Editor.js (line 427)

(?)()dojo.js.uncompressed.js (line 1943)

(?)()dojo.js.uncompressed.js (line 3527)

_setStack(Object { name="_20"}, Object { name="by"})focus.js (line 274)

(?)()focus.js (line 210)

[Break on this error] return (args == 1) ? s : _toStyleVal... /* CSS2Properties||String||Number */
dojo.js.uncompressed.js (line 5878)

Change History (4)

comment:1 Changed 9 years ago by bill

Component: GeneralEditor
Owner: anonymous deleted

Editor can't be initialized when it's hidden. It sounds like maybe you are hiding the editor while it's initializing? (Are you pressing the hide button really quickly?)

From your stack trace it looks like the error is occurring when something (probably the editor iframe) gets focus. Did you set that editor focusOnLoad flag to true perchance?

comment:2 Changed 9 years ago by bill

Upon rereading your description I see my question didn't make sense. The editor is losing focus (because the button is getting focus), but at the same time it's being hidden. I guess there's some race condition there and I'm sure you could workaround this problem but using a setTimeout(..., 0) in your onclick handler for the button.

comment:3 Changed 9 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

(In [23156]) Minor tweaks to try and catch race condition issues with hiding editor while focus blur on editor. \!strict fixes #11899

comment:4 Changed 9 years ago by Jared Jurkiewicz

Milestone: tbd1.6
Note: See TracTickets for help on using tickets.