W3C home > Mailing lists > Public > public-device-apis-log@w3.org > December 2020

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

From: YQuan via GitHub <sysbot+gh@w3.org>
Date: Thu, 24 Dec 2020 06:25:31 +0000
To: public-device-apis-log@w3.org
Message-ID: <issues.opened-774214099-1608791129-sysbot+gh@w3.org>
lostncg has just created a new issue for https://github.com/w3c/vibration:

== api.Navigator.vibrate - Throwing intervention error of vibration after user already interacted with UI. ==
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: <URL>.

<!-- Do not make changes below this line -->
<details>
<summary>MDN page report details</summary>

* Query: `api.Navigator.vibrate`
* MDN URL: https://developer.mozilla.org/en-US/docs/Web/API/Vibration_API
* Report started: 2020-12-24T05:50:02.542Z

</details>

Please view or discuss this issue at https://github.com/w3c/vibration/issues/25 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 24 December 2020 06:25:36 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 December 2020 06:25:36 UTC