Opened 9 years ago

Closed 9 years ago

#11477 closed defect (wontfix)

Destroying an Element inside a TooltipDialog in Safari 5 results in the Dialog Closing

Reported by: Pete Smith Owned by:
Priority: blocker Milestone: tbd
Component: Dijit Version: 1.5
Keywords: Cc:
Blocked By: Blocking:

Description

Easy way to repro.

<div dojoType="dijit.form.DropDownButton">
        <span>Safari bug/span>
       
        <div dojoType="dijit.TooltipDialog">
            <div dojotype="dijit.form.Button" onClick="this.destroy();">       	Destroy me and watch my dialog close, only on Safari!!!
            </div>

</div>
</div>

Change History (2)

comment:1 Changed 9 years ago by Pete Smith

Thanks to wildbill, I have a workaround. In the dijit that I need to be destroyed, I added:


/*Needed to do this since when destroying the node, we set the focus to the row before it, otherwise it stole focus and closed the containing dialog*/
	uninitialize: function(){
		var myRows = this.filter.filterCriteria.rows;
		dijit.focus(dijit.byNode(myRows[myRows.length-2]).PropVar.focusNode);
	}

So all I do is scarf the focus BEFORE I destroy myself, thus the dialog stays open. Obviously change for your implementation, but that is the key. Safari / Chrome don't like it if you steal the focus on your el within the TooltipDialog?.

comment:2 Changed 9 years ago by bill

Resolution: wontfix
Status: newclosed

Right, and I don't see any way to "fix" this problem automatically, the app needs to do this. It's standard procedure to close a popup when focus is moved somewhere outside of the popup.

Note: See TracTickets for help on using tickets.