Opened 13 years ago

Closed 12 years ago

#1882 closed defect (wontfix)

When a Floating Pane is closed, All Events seem to break??

Reported by: james.hall@… Owned by: koranteng
Priority: high Milestone: 0.9
Component: Widgets Version: 0.4
Keywords: Cc:
Blocked By: Blocking:

Description

Installing version 0.4 of dojo has broken something for me. Now, when I close a particular Floating Pane, things seem to be okay, but then as soon as I click on anything, either a menu, or just the web page, I get a Fatal Exception [object Error]. This did not happen in 0.3. If I debug, it comnes up with a problem in dojo.js line 3479 (I am just using the standard distribution).

The following code is where it occurs in (I think)

var _32c; try{ if((thisaround?)&&(this.around.length>0)){ var mi=new dojo.event.MethodInvocation?(this,obj,args); _32c=mi.proceed(); }else{ if(this.methodfunc){ _32c=this.object[this.methodname].apply(this.object,args); } } } Error highlight appears here * catch(e){ if(!this.squelch){ dojo.raise(e); } } if((thisafter?)&&(this.after.length>0)){ dojo.lang.forEach(this.after.concat(new Array()),_32b); } return (this.methodfunc)?_32c:null;

Attachments (1)

vle2.zip (8.8 KB) - added by james.hall@… 13 years ago.
I have done my best to save out the files. Unzip all to a folder, paste a copy of the dojo 0.4 file structure under the folder as well and it should run. Go to the help menu, select help. Close down the help window, and try to run the help again.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 13 years ago by bill

Can you attach a test case?

comment:2 Changed 13 years ago by james.hall@…

I shall see if I can create a test case, but it might be awkward as the system we are developing is against a custom back end server, and is spread over multiple source files.

Incidentaly, all of the dojo stuff we are using is all create via code, there is no dojo divs in the source html file. DOnt know if this matters.

comment:3 Changed 13 years ago by guest

Could you do a file|save as... to a static html file and copy the linked js files to a directory, then modify the saved file to point to these? Then get the error to come up (e.g. by hard coding some values in the copied js files) and progressively strip out stuff, continually checking the error still occurs. Apologies if IATAGMTSE.

Changed 13 years ago by james.hall@…

Attachment: vle2.zip added

I have done my best to save out the files. Unzip all to a folder, paste a copy of the dojo 0.4 file structure under the folder as well and it should run. Go to the help menu, select help. Close down the help window, and try to run the help again.

comment:4 Changed 13 years ago by james.hall@…

Has anyone had a chance to look at the included sample, or have any ideas on this?

comment:5 Changed 13 years ago by bill

I'm not very inclined to look at a 10 page testcase, but the other problem is that when I bring it up, I see no floating pane. What are the steps to reproduce the problem? I assume, this is on IE only. Then you do "Help"/"help" from the menu? That brings up a floating pane I can close it fine, and continue to use the menu. (This is testing against 0.4.1rc1)

comment:6 Changed 13 years ago by james.hall@…

Thats exactly how to reproduce the case, I guess your not getting the problem. WHen I run it against version 0.4 of dojo (the version I downloaded off of the front page of the web site) I go to the help menu, click help, close down the floating pane, and then if I try to do anything else, it crashes. Yes, this is IE 6 I am running it on. How do I get 0.4.1rc1 in an easy to download package. Thanks for testing it.

comment:7 Changed 13 years ago by james.hall@…

Hi, I downloaded 0.4.1rc1 and tried my test case with it, but I still get an error. It is a more informative error than before :

DEBUG: [TypeError: 'offsetWidth' is null or not an object] when calling onClick$joinpoint$method on [object Object] with arguments [object Object] FATAL exception raised: 'offsetWidth' is null or not an object

Looks like I am still stuck with using 0.3 for the time being. I wonder if its the way I am doing something?

comment:8 Changed 13 years ago by bill

I got mail from James saying:

"I think I have sorted the problem out. It seemed to be a problem with the menu creation for the floating window. I was creating the menu and adding it to the contentpane widget, but I am now adding it to the contentpane's domnode and it seems to have fixed the problem."

It seems this bug is related to adding child widgets to a floating pane dynamically... which seems like something we haven't really tested / aren't really supporting. Same for ContentPane?. James' solution works but I think it leaks the Menu widget object. (When the FloatingPane? is destroyed, Menu.destroy() isn't called.)

comment:9 Changed 13 years ago by alex

Milestone: 0.5
Priority: highnormal

if addChild() isn't being used, the hosting widget should at least have the sub widget added to it's children[] array manually. That should ensure correct destruction.

comment:10 Changed 12 years ago by koranteng

Owner: changed from bill to koranteng

comment:11 Changed 12 years ago by bill

Resolution: wontfix
Status: newclosed

Floating Panes no longer supported in Dijit; use Dialog instead. (If there is a similar problem w/dialog then please open a new bug.)

Note: See TracTickets for help on using tickets.