Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dblclick event is not fired on Android Chrome #5310

Open
SuperPat45 opened this issue Aug 30, 2023 · 1 comment
Open

dblclick event is not fired on Android Chrome #5310

SuperPat45 opened this issue Aug 30, 2023 · 1 comment

Comments

@SuperPat45
Copy link

I noticed that the dblclick event is not fired on Android Chrome:

$(element).on("dblclick", (e) => {
	alert("dblclick");
});

As a workaround, I replaced by:

$(element).on("click", (e) => {
	if (this._timeout)
		this._dubbleTap = true;
	else {
		this._dubbleTap = false;
		this._timeout = setTimeout(() => {
			delete this._timeout;
			if (this._dubbleTap)
				alert("dblclick");
			else
				alert("click");
			this._dubbleTap = false;
		}, 250);
	}
});

I think jQuery should handle this case in version 4.0.

@jmroelofs
Copy link

jmroelofs commented Aug 30, 2023

The dblclick event is not supported on Android Chrome: https://developer.mozilla.org/en-US/docs/Web/API/Element/dblclick_event
It's debatable whether jQuery should fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants