Opened 11 years ago

Closed 11 years ago

#11658 closed defect (fixed)

TabContainer test crashes IE6

Reported by: haysmark Owned by: bill
Priority: high Milestone: 1.6
Component: Dijit Version: 1.5
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)


On the first TabContainer, open the drop down of tabs and select "SplitContainer? from href." IE6 crashes spectacularly. IE8 works just fine in both IE8 and IE7 modes but I have not actually tried IE7.

Change History (5)

comment:1 Changed 11 years ago by haysmark

I should also note that this test case is from the robot TabContainer? mouse test.

comment:2 Changed 11 years ago by bill

Description: modified (diff)
Milestone: tbd1.6
Owner: set to bill
Status: newassigned

Good catch, an actual browser crash... this started in [22703], so I'll take a look.

comment:3 Changed 11 years ago by bill

The problem is that dijit.popup.close() is getting called twice, recursively, as follows:

  1. _HasDropDown specifies callback functions to, so that clicking a MenuItem calls _HasDropDown.closeDropDown()
var retVal ={
	parent: this,
	popup: dropDown,
	around: this._aroundNode,
	orient: dijit.getPopupAroundAlignment((this.dropDownPosition && this.dropDownPosition.length) ? this.dropDownPosition : ["below"],this.isLeftToRight()),
	onExecute: function(){
	onCancel: function(){
	onClose: function(){
		dojo.attr(self._popupStateNode, "popupActive", false);
		dojo.removeClass(self._popupStateNode, "dijitHasDropDownOpen");
		self._opened = false;
  1. that calls dijit.popup.close() which calls dijit.popup.moveOffScreen() on the drop down Menu
  1. moving the Menu offscreen (and setting visibility:hidden?) blurs the widget, setting focus nowhere, triggering a call to _HasDropDown._onBlur(), which calls closeDropDown(), which calls, again

Normally this doesn't happen, because of the focus() call in _HasDropDown.closeDropDown():

closeDropDown: function(/*Boolean*/ focus){
	// summary:
	//		Closes the drop down on this widget
	// focus:
	//		If true, refocuses the button widget
	// tags:
	//		protected
		if(focus){ this.focus(); }
		this._opened = false;

However, I set the menu button to be unfocusable, in #11155. Maybe I'll roll back that change.

comment:4 Changed 11 years ago by bill

Hmm, maybe the problem is less about the recursive call and more about hiding the focused node. In any case, I will check in a fix.

comment:5 Changed 11 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [22789]) Move focus to button before hiding menu, to avoid crash on IE6. Fixes #11658, refs #11155 !strict.

Note: See TracTickets for help on using tickets.