Closed
Bug 639924
Opened 13 years ago
Closed 8 years ago
-moz-touch-enabled media query fails at targeting mobile devices with touch screens
Categories
(Core Graveyard :: Widget: Android, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: public, Unassigned)
Details
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:2.0b12) Gecko/20100101 Firefox/4.0b12 Build Identifier: -moz-touch-enabled is set to 0 instead of 1 on all mobile devices but Nokia NX00, even though they do have a touch screen. Vivien pointed out that the following code is setting it to 0: http://mxr.mozilla.org/mozilla-central/source/widget/src/android/nsLookAndFeel.cpp#372 and that the following code is setting it to 1 for Nokia NX00: http://mxr.mozilla.org/mozilla-central/source/widget/src/gtk2/nsLookAndFeel.cpp#522 Reproducible: Always Steps to Reproduce: 1. Grab a mobile device with Firefox mobile installed 2. Visit http://jsfiddle.net/xH3WW/ Actual Results: The square is red Expected Results: The square should be green
Comment 1•13 years ago
|
||
That's an android widget bug, no?
Component: Style System (CSS) → Widget: Android
QA Contact: style-system → android
Status: UNCONFIRMED → NEW
Ever confirmed: true
Wow, that's really ironic. First Mozilla is the only one who offers media features and then it fails where you need it the most ...! Furthermore the JS detection for touch events also fails => see http://haz.io
Comment 3•13 years ago
|
||
http://haz.io/ works for me, using current trunk Fennec build on the LG Optimus Black. I guess you were using Firefox desktop? In any case, it's not relevant to this bug.
@Martijn: I use the version (Firefox 6.0 for Android) you get from the Market - so probably the version the vast majority of users will use ... And you are certainly right that this (bug!?) has nothing to do with the one mentioned here but both together makes it impossible to optimize a web page for touch devices as there is no way (neither via CSS nor per JS) to detect them. But without any doubt I'd prefer the CSS way ...! ;-)
Comment 5•13 years ago
|
||
Yes, but trunk builds are currently what Firefox 9 for Android eventually will be.
Comment 6•8 years ago
|
||
This works now, square in the JSFiddle link is green on Nightly 52 (and probably has been for a long time now).
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Updated•3 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•