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

api.Navigator.vibrate - Throwing intervention error of vibration after user already interacted with UI. #25

Closed
lostncg opened this issue Dec 24, 2020 · 3 comments

Comments

@lostncg
Copy link

lostncg commented Dec 24, 2020

Google Chrome Version 87.0.4280.88 (Official Build) (x86_64)

What information was incorrect, unhelpful, or incomplete?

Missing one Vibration API to check whether developer can trigger vibration or not.

What did you expect to see?

Allow me to trigger vibration when user interact with UI elements.

Did you test this? If so, how?

I tried to trigger vibration after element clicked (click and on hold), and trigger event in touchmove, but if finger still on hold, vibrate API will still assume user not yet interact, and throw error below.

[Intervention] Blocked call to navigator.vibrate because user hasn't tapped on the frame or any embedded frame yet: .

MDN page report details
@rakuco
Copy link
Member

rakuco commented Jan 12, 2021

User activation handling seems to be an implementation-specific feature at this point: it's not mentioned in the spec and was added to Blink in M60.

User activation itself is part of the HTML spec these days though, and if I understood this issue correctly the idea in this issue is to add more events to the list of activation triggering input events, right? If so, it might be better to file an issue against the HTML spec itself.

@johannhof
Copy link
Member

FYI i filed #29 for having this in the spec. I agree that this issue can probably be closed as vibrate doesn't govern user activation rules.

@anssiko
Copy link
Member

anssiko commented May 3, 2022

Thanks @johannhof, followed up in #29.

@anssiko anssiko closed this as completed May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants