Closed Bug 1697253 Opened 2 years ago Closed 2 years ago

`typeof VisualViewport` returns "function" regardless of the dom.visualviewport.enabled flag

Categories

(Core :: DOM: Core & HTML, defect)

Firefox 87
defect

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: myakura.web, Assigned: saschanaz)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:87.0) Gecko/20100101 Firefox/87.0

Steps to reproduce:

  1. open DevTools console
  2. type typeof VisualViewport
  3. check out the result

Actual results:

it returns "function"

Expected results:

it should return "undefined" on environments where dom.visualviewport.enabled is set to false (currently by default on desktop)

Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
Assignee: nobody → krosylight
Severity: -- → S3

Bug 1357785 accidentally omitted the flag on the interface itself. This patch makes thing consistent to prevent potential confusion in feature detection.

Pushed by krosylight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e780bd8fa66a
Hide VisualViewport interface behind the existing pref r=edgar
Flags: needinfo?(krosylight)
Pushed by krosylight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e055c9f7abe0
Hide VisualViewport interface behind the existing pref r=edgar
Regressions: 1697994
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.