Digit highjacks the click handler for some users but not others, on exact same browser config and version
In dijit.js, the function stopNativeEvents() is triggered on some browsers but not others. This is not related to a browser version or something, so this is very strange:
- Two users with the exact same Chrome version, one experiences the issue and the other not.
- This seems quite unfrequent: reported by 3 users amongst over 100 using our app
- Experiences on Chrome and Edge
- Looked at permissions of plugins to see if this could affect the behavior but couldn't discern any difference.
Triggering code:
function makeTooltipDialog(elementId, content) {
var that = this;
require(["dijit/TooltipDialog","dijit/popup","dojo/on","dojo/dom"], function(TooltipDialog, popup, on, dom) {
that.tooltipDialog = dojoDijit.byId(elementId+"_TD");
if (that.tooltipDialog != null)
{
console.warn("DESTROYING tooltipDialog "+elementId);
that.tooltipDialog.destroy();
that.tooltipDialog = null;
}
that.tooltipDialog = new TooltipDialog({
id: elementId+"_TD",
content: content,
onMouseLeave: function(){
popup.close(that.tooltipDialog);
}
});
on(dojoDom.byId(elementId), 'click', function(){
dojoDijit.popup.open({
popup: that.tooltipDialog,
around: dom.byId(elementId)
});
});
});
};
On some user accounts, this results in a click-handler being added to the element and gobbling up events, while for other users, the click handler is never instantiated. I traced this to clickTracker being set.
Again, this behavior has been observed with users on the exact same browser setup as other users who do not experience this issue.
Thank you.
You should set a breakpoint to figure out who is calling stopNativeEvents() at all. There's no way to tell from your code snippet, and I don't see it getting called at all.
The problem might be related to focus jumping to the popup after it's opened, and the timing of the click (how long between mousedown and mouseup), although that doesn't really make sense either because the click event (and the popup.open() call) shouldn't happen until after mouseup.
Hello Bill,
I will check the stack trace and try to gather additional insights.
I am not sure this is timing related though but will check that angle.
Thank you,
Sent from my BlackBerry - the most secure mobile device
From: @.*** Sent: February 7, 2022 20:41 To: @.*** Reply-to: @.*** Cc: @.; @. Subject: Re: [dojo/dojo] Digit highjacks the click handler for some users but not others, on exact same browser config and version (Issue #420)
You should set a breakpoint to figure out who is calling stopNativeEvents() at all. There's no way to tell from your code snippet, and I don't see it getting called at all.
The problem might be related to focus jumping to the popup after it's opened, and the timing of the click (how long between mousedown and mouseup), although that doesn't really make sense either because the click event (and the popup.open() call) shouldn't happen until after mouseup.
— Reply to this email directly, view it on GitHubhttps://github.com/dojo/dojo/issues/420#issuecomment-1032124468, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AADEHB5IFXKZXKJU2WFKBBLU2BYC7ANCNFSM5NYYFZ4Q. You are receiving this because you authored the thread.Message ID: @.***>
Hello!
Here are screenshots i am getting when clicking inside the tooltip DIV (just regular <A href=""></A> stuff). I put a breakpoint at the beginning of the method, and at the beginning of the handler.




The really strange thing is that when i run this code from my VM, in the same corporate environment as this user, on the exact same Chrome version, none of the breakpoints come up: doClicks() is not being called at all.
I am accessing this VM via VPN+Remote Desktop while the user is straight at a desktop at his desk, so i'd think i'd be the one more prone to timing issues?
I just realized that stopNativeEvents() and doClicks() are part of dojo/touch.js.
That whole module has probably outlived its usefulness as you can get the same effect without javascript, see https://developers.google.com/web/updates/2013/12/300ms-tap-delay-gone-away.
I suggest you just disable the module. Whatever your build system is you could remap dojo/touch to an empty file, or something like that.