Opened 7 years ago

Closed 7 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:



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:

< 			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"))
> 			];
< 			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)

DialogUnderlay_js.patch (906 bytes) - added by aperger 7 years ago.

Download all attachments as: .zip

Change History (2)

Changed 7 years ago by aperger

Attachment: DialogUnderlay_js.patch added

comment:1 Changed 7 years ago by bill

Resolution: invalid
Status: newclosed

Thanks for the report but there's no such this._modalConnects = new Array(); code in DialogUnderlay?.js. The actual code is

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.

Note: See TracTickets for help on using tickets.