Fix blank Sound and Display settings screens (JavaScript error: app://settings.gaiamobile.org/js/settings.js, line 294: ranges[i].refresh is not a function)

RESOLVED FIXED

Status

RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: jwatt, Assigned: jwatt)

Tracking

unspecified
All
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(b2g-v1.1hd fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
The Sound and Display settings screens in B2G builds that are built against mozilla-central are broken (blank) and render the phone unusable until rebooted if the user tries to view them. The console contains this error:

JavaScript error: app://settings.gaiamobile.org/js/settings.js, line 294: ranges[i].refresh is not a function

The issue is that the polyfill code for <input type=range> adds a refresh() method to the element that replaces the <input>, and some code calls that without checking if the element is a native implementation or the polyfill.

The pref to enable native <input type=range> was flipped on in bug 841948.
(Assignee)

Comment 1

6 years ago
Created attachment 728661 [details] [diff] [review]
patch
Attachment #728661 - Flags: review?(mwu)
(Assignee)

Comment 2

6 years ago
I'm making the code work in the case where the native <input type=range> is both enabled and disabled (rather than removing the polyfill) since the gaia code has to work with both older and newer gecko trees for now.

Comment 3

6 years ago
Comment on attachment 728661 [details] [diff] [review]
patch

Forwarding review to someone who might know the code.
Attachment #728661 - Flags: review?(mwu) → review?(kaze)
Comment on attachment 728661 [details] [diff] [review]
patch

Review of attachment 728661 [details] [diff] [review]:
-----------------------------------------------------------------

https://github.com/mozilla-b2g/gaia/commit/1eb7430d65e7ae1c355b758fbc18ec3f00c5e57e
Attachment #728661 - Flags: review?(kaze) → review+
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
(Assignee)

Updated

6 years ago
Blocks: 853808
Need this one for v1.1.0hd (related to https://bugzilla.mozilla.org/show_bug.cgi?id=854469)
status-b2g-v1.1hd: --- → ?

Updated

5 years ago
Blocks: 802234
Please, see comment 6 ^^ : https://bugzilla.mozilla.org/show_bug.cgi?id=854138#c6
Flags: needinfo?(wchang)

Updated

5 years ago
Flags: needinfo?(wchang)
You need to log in before you can comment on or make changes to this bug.