Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#17970 closed defect (fixed)

DateTextBox in TooltipDialog doesn't open first time (IE10)

Reported by: bill Owned by: bill
Priority: undecided Milestone: 1.9.4
Component: Dijit Version: 1.9.3
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

See test_TooltipDialog.html. Open first TooltipDialog? and then click DateTextBox? to open Calendar. The Calendar does not open.

This is causing a failure in the TooltipDialog_mouse.html test, but only when run from runTests.html.

The problem is that the DropDownButton? to open the TooltipDialog? never sees the mouse up event after it's pressed.

Change History (5)

comment:1 Changed 6 years ago by bill

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

comment:2 Changed 6 years ago by bill

The error occurs in the mouseup listener setup in _FormWidgetMixin_onFocus():

// Set a global event to handle mouseup, so it fires properly
// even if the cursor leaves this.domNode before the mouse up event.
var mouseUpHandle = this.own(on(this.ownerDocumentBody, "mouseup, touchend", lang.hitch(this, function(evt){
	mouseUpHandle.remove();
	focusHandle.remove();
	// if here, then the mousedown did not focus the focusNode as the default action
	if(this.focused){
		if(evt.type == "touchend"){
			this.defer("focus"); // native focus hasn't occurred yet
		}else{
			this.focus(); // native focus already occurred on mousedown
		}
	}
})))[0];

_FormWidgetMixin._onFocus() doesn't hear the mouseup event on the DropDownButton? (the button to open the TooltipDialog?), so the handler remains listening until the mousedown on the DateTextBox? arrow.

The minimal fix is presumably to change IE10/IE11 to listen to MSPointerUp/pointerup instead of mouseup. Probably _HasDropDown or someone is calling preventDefault on the MSPointerUp, so there's no mouseup event.

A more pervasive fix would be to use dojo/touch.release. I don't like the current code because it's presumably calling focus twice on iOS and android, once on touchend and once on the synthetic mouseup event. But see #16222 and #16725 for the subtle problems that occur on android and iOS. Those tickets imply we need to act on mouseup on Android rather than touchend, although that's hard to believe.

Also, see the code in TextBox?.js from [31192]:

on(this._phspan, "touchend, pointerup, MSPointerUp", lang.hitch(this, function(){
	// If the user clicks placeholder rather than the <input>, need programmatic focus.  Normally this
	// is done in _FormWidgetMixin._onFocus() but after [30663] it's done on a delay, which is ineffective.
	this.focus();
}))

comment:3 Changed 6 years ago by Bill Keese <bill@…>

Resolution: fixed
Status: assignedclosed

In 3ae93b6ecd641e4cc9d4c8368f33c9ac35f5c764/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:4 Changed 5 years ago by Bill Keese <bill@…>

In 3bf7455d4cf702a992fac0e9e908d2eadadebb00/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:5 Changed 5 years ago by bill

Milestone: 1.101.9.4
Note: See TracTickets for help on using tickets.