Opened 15 years ago
Closed 15 years ago
#4440 closed defect (fixed)
dijit.popup.close() has invalid order of operations
Reported by: | guest | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.0 |
Component: | Dijit | Version: | 0.9 |
Keywords: | dijit popup popup.close | Cc: | [email protected]…; [email protected]… |
Blocked By: | Blocking: |
Description
The "close" method inside of dijit.popup has an invalid order of operations:
var widget = stack[stack.length-1].widget;
if(widget.onClose){
widget.onClose();
}
if(!stack.length){
return;
}
The test for whether the stack is empty needs to take place before an access to it can be made. If the stack is indeed empty, then the first operation will result in a negative index. The required order needs to be:
if(!stack.length){
return;
}
var widget = stack[stack.length-1].widget;
if(widget.onClose){
widget.onClose();
}
Change History (5)
comment:1 follow-up: 2 Changed 15 years ago by
Milestone: | → 1.1 |
---|---|
Owner: | set to bill |
comment:2 Changed 15 years ago by
comment:3 Changed 15 years ago by
Milestone: | 1.1 → 1.0 |
---|
Don't worry, nobody looks at the severity listings anyway. I didn't realize that InlineEditBox/DateTextBox? was broken; I think this bug indicates another problem with dijit, or otherwise close() wouldn't be called when nothing was open (somehow there's a recursion where the first close() call triggers an _onBlur event which triggers another close() call?)
OK, I'll fix for 1.0.
comment:5 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to bill:
I know this is set to be fixed in 1.1 and a severity of normal, but, in my case, this bug makes the dateTextBox unusable with an inlineEditBox in IE. I imagine it does the same for other developers, too. In my opinion, it ought to be considered a major issue and should go out in the next release.