Closed Bug 1063707 Opened 10 years ago Closed 9 years ago

matchMedia() returns invalid results if called too early

Categories

(Firefox for Android Graveyard :: Toolbar, defect)

32 Branch
ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: maxaks, Unassigned)

References

()

Details

Device screen is 720x1280 pixels.

If you call window.matchMedia('(max-width: 480px)').matches on DOMContentLoaded, it will return false.
Calling it 1 second later properly returns true.

It started to happen in FF 32. FF 31 and latest mobile Chrome seem to work fine (the linked test page properly displays "true, true", while Fennec 32 shows "false, true".
Should this be moved to Core::CSS Parsing & Computation?
Component: General → Graphics, Panning and Zooming
The test case linked from this bug works fine now in the latest Nightly. It was probably fixed by bug 1180267 which landed yesterday.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Depends on: 1180267
Resolution: --- → WORKSFORME
(I tested on a Nexus 4, for the record)
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.