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

Navigator/vibrate - Firefox for Android doesn't vibrate #7172

Merged
merged 8 commits into from
Jan 30, 2021

Conversation

VoxelPrismatic
Copy link
Contributor

@VoxelPrismatic VoxelPrismatic commented Oct 29, 2020

A checklist to help your pull request get merged faster:

  • Summarize your changes
  • Data: link to resources that verify support information (such as browser's docs, changelogs, source control, bug trackers, and tests)
  • Data: if you tested something, describe how you tested with details like browser and version
  • Review the results of the linter and fix problems reported (If you need help, please ask in a comment!)
  • Link to related issues or pull requests, if any

Summary: Firefox for Android [Daylight, Nightly, Beta] doesn't support vibration, although it always returns true when the window is active
Data: Tested on Firefox for Android Daylight, Nightly and Beta on a Galaxy S8 running Android 9. Test it out with this tool
Notes: I tested that same tool out in Samsung Internet, vibration works fine. I also have mozVibrate() on that tool just in case.

Possible help: Is there a separate note for API/Vibration_API or is it linked? Otherwise all is good

@github-actions github-actions bot added the data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Oct 29, 2020
@saschanaz
Copy link
Contributor

There is a bug for this: mozilla-mobile/fenix#2371

@VoxelPrismatic
Copy link
Contributor Author

I didn't catch that one, thank you.

@saschanaz
Copy link
Contributor

Oops, we need this PR because it really is a known issue! If this has been broken for a while we should document it here.

@VoxelPrismatic
Copy link
Contributor Author

well then

@ddbeck
Copy link
Collaborator

ddbeck commented Nov 12, 2020

Wow, the existing data here is kinda messy! I think the gist here is that vibration was (inadvertently?) removed in Firefox 72. Check out https://bugzilla.mozilla.org/show_bug.cgi?id=1591113 for details. I think this means we need to restructure the data for both the "firefox" entry and "firefox_android".

It should look a little something like this (ignoring the prefixed entry after these):

  {
    "version_added": "72",
    "partial_implementation": true,
    "notes": "Vibration is disabled. If the window is visible, then <code>navigator.vibrate()</code> returns <code>true</code>, but no vibration takes place (regardless of hardware support). See <a href='https://bugzil.la/1591113'>bug 1591113</code>."
  },
  {
    "version_added": "16",
    "version_removed": "72",
    "notes": [
      "Until Firefox 26 included, when the vibration pattern was too long or any of its elements too large, Firefox threw an exception instead of returning <code>false</code> (<a href='https://bugzil.la/884935'>bug 884935</a>).",
      "From Firefox 32 onwards, when the vibration pattern is too long or any of its elements too large, it returns <code>true</code> but truncates the pattern (<a href='https://bugzil.la/1014581'>bug 1014581</a>).",
    ]
  }

@VoxelPrismatic
Copy link
Contributor Author

I dont think we should put it on firefox because as far as i know, no desktop or laptop actually has a vibration motor. Adding that info would be redundant.

@VoxelPrismatic
Copy link
Contributor Author

strange, the build is failing because firefox version 72 is invalid even though the latest firefox daylight is 82.1.3

@ddbeck
Copy link
Collaborator

ddbeck commented Nov 12, 2020

Oops, that was an oversight on my part. Firefox for Android had a discontinuity—it jumped from 68 to 79. So that value should be bumped to 79. Sorry about that!

@ddbeck
Copy link
Collaborator

ddbeck commented Jan 26, 2021

@VoxelPrismatic do you plan to return this PR? Or should we open a follow up issue instead? Either way, thank you!

Co-authored-by: Queen Vinyl Darkscratch <[email protected]>
@VoxelPrismatic
Copy link
Contributor Author

Oh sorry I didn't receive any emails on this thread.

Co-authored-by: Queen Vinyl Darkscratch <[email protected]>
@VoxelPrismatic
Copy link
Contributor Author

Just tested on Nightly 210125 17:01 [latest as of writing], still doesn't vibrate

@ddbeck ddbeck self-requested a review January 26, 2021 16:06
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for persisting at this, @VoxelPrismatic! A couple of suggestions here. We're quite close, but it's unusual data.

Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! 🎉

@ddbeck ddbeck merged commit 5fdeeeb into mdn:master Jan 30, 2021
germain-gg pushed a commit to germain-gg/browser-compat-data that referenced this pull request Feb 1, 2021
…icture

* upstream/master: (1123 commits)
  Remove Chromium 89 from String.at / Array.at / TypedArray.at (mdn#8869)
  Add worker_support info for CacheStorage (mdn#8783)
  Remove several needless "Enabled by default" notes (mdn#8899)
  Add HTML global attribute nonce (mdn#8764)
  api.Navigator.vibrate - Firefox for Android doesn't vibrate (mdn#7172)
  Mark MediaSource's onsourceclose as not supported in Firefox (mdn#8881)
  Update Florian's ownership (mdn#8893)
  Mention fix for Chrome's broken PDF loading (mdn#8867)
  Fill out Chrome data for html.elements.source.{sizes,srcset} (mdn#8889)
  Weekly data release for 2021-01-28
  Add text-decoration-thickness for Opera 73+ (mdn#8872)
  Update :is and :where pseudo-classes for Chrome (mdn#7375)
  Add note re Safari <9 partial srcset/sizes support (mdn#7353)
  Update data for when href (not xlink:href) can be used in SVG (mdn#6603)
  Add top-level await (mdn#8807)
  TouchList: Add Safari Desktop and Safari iOS versions (mdn#8848)
  Update Firefox versions to account for Firefox 85 release (mdn#8864)
  Fix page_action.show_matches support for Android (mdn#8844)
  Update Safari support for devicechange_event (mdn#8863)
  Add HTTPS-only to privacy.network (mdn#8830)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants