Opened 4 years ago

Closed 4 years ago

#18709 closed defect (duplicate)

In IE11, touch.js generates a click after a right mouse button click

Reported by: seftur Owned by:
Priority: undecided Milestone: tbd
Component: Events Version: 1.10.4
Keywords: Cc:
Blocked By: Blocking:

Description

I had created the button ("dijit/form/Button") as follows:

new Button({
	onClick: function() {
		console.log("I have been clicked");
	}
	, showLabel: true
	, label: "My button"
	, title: "Title goes here"
});

In IE11, right click on the button, it will open the browsers default popup menu. Press "Esc", or click somewhere else to close the popup menu => the button is clicked anyway. This doesn't happen only to buttons, but pretty much all widgets.

I think the problem is in touch.js at:

if(hasPointer){
	 // MSPointer (IE10+) already has support for over and out, so we just need to init click support
	domReady(function(){
		win.doc.addEventListener(pointer.down, function(evt){
			doClicks(evt, pointer.move, pointer.up);
		}, true);
	});
}else if(hasTouch){
	domReady(function(){
	...

I don't know enough about the inner workings of Dojo, but I think it might need to be as follows:

if(hasTouch){
	if(hasPointer){
		 // MSPointer (IE10+) already has support for over and out, so we just need to init click support
		domReady(function(){
			win.doc.addEventListener(pointer.down, function(evt){
				doClicks(evt, pointer.move, pointer.up);
			}, true);
		});
	} else {
		domReady(function(){
		...

Change History (1)

comment:1 Changed 4 years ago by bill

Component: GeneralEvents
Resolution: duplicate
Status: newclosed

Duplicate of #18342.

Note: See TracTickets for help on using tickets.