Opened 5 years ago
Closed 5 years ago
#18658 closed defect (invalid)
Dialog hide causes exception on some pages
Reported by: | aperger | Owned by: | bill |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | Dijit | Version: | 1.10.4 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Hi
We have web application. We are using lots of dijit components. I have created two dialog box, one for help and one for send feedback (by the user). Both dialog has a property called data-dojo-id, so I can handle the dialogs with a registered variable. Unfortunately when the user closes a dialog box exceptions raise:
"exception in animation handler for: onEnd"
- "TypeError?: this._modalConnects.pop(...) is undefined"
.. after this error, the site is working well till the user want to resize the browser window (Chrome/FF, too): The page color turns semi-transparent and the controllers are disabled.
I found the point where the dialog initialization are going wrong: dijit/DialogUnderlay.js.
I have tried to use the "lang.hitch" to change the context when I open the dialogs, but it was not solve my problem.
I have created a PATCH to DialogUnderlay?.js:
108,115c108,112 < this._modalConnects = new Array(); < < var _modalConnect = Viewport.on("resize", lang.hitch(this, "layout")); < if (_modalConnect) this._modalConnects.push(_modalConnect); < < // TODO (aperger): in some cases returns back with "undefined" ??? < _modalConnect = on(win, "scroll", lang.hitch(this, "layout")); < if (_modalConnect) this._modalConnects.push(_modalConnect); --- > this._modalConnects = [ > Viewport.on("resize", lang.hitch(this, "layout")), > on(win, "scroll", lang.hitch(this, "layout")) > ]; > 125,129c122 < while(this._modalConnects.length) { < // (aperger): check for correct values, maybe is not need!!! < var _modalConnect = this._modalConnects.pop(); < if (_modalConnect) _modalConnect.remove(); < } --- > while(this._modalConnects.length){ (this._modalConnects.pop()).remove(); }
This solves my errors! Maybe help to fix the BUG or somebody can help me to solve my failure.
Thanks, Attila
Attachments (1)
Change History (2)
Changed 5 years ago by
Attachment: | DialogUnderlay_js.patch added |
---|
comment:1 Changed 5 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Thanks for the report but there's no such
this._modalConnects = new Array();
code in DialogUnderlay?.js. The actual code is https://github.com/dojo/dijit/blob/master/DialogUnderlay.js#L108.If you can provide a test case that fails with the actual dijit code instead of that strange variation that you are working with, I'll take a look.