mobile false positives on input[type=file] #772

Closed
paulirish opened this Issue Dec 22, 2012 · 7 comments

Projects

None yet

5 participants

@paulirish
Member
@stucox stucox pushed a commit to stucox/Modernizr that referenced this issue Dec 29, 2012
Stuart Cox Added fileinput test mobile UA blacklist for issue #772 d7ea487
@stucox stucox added a commit to stucox/Modernizr that referenced this issue Dec 29, 2012
@stucox stucox Added fileinput test mobile UA blacklist for issue #772 cd5c698
@paulirish
Member

fixed by #773

@paulirish paulirish closed this Jan 7, 2013
@viljamis
Contributor
viljamis commented Jan 8, 2013

This is great news!

@SlexAxton SlexAxton pushed a commit to SlexAxton/Modernizr that referenced this issue Feb 14, 2013
Stuart Cox Added fileinput test mobile UA blacklist for issue #772 770b625
@SlexAxton SlexAxton pushed a commit to SlexAxton/Modernizr that referenced this issue Feb 14, 2013
@stucox stucox Added fileinput test mobile UA blacklist for issue #772 8c59421
@SlexAxton SlexAxton added a commit to SlexAxton/Modernizr that referenced this issue Feb 23, 2013
@SlexAxton SlexAxton Merge branch 'master' of github.com:Modernizr/Modernizr
* 'master' of github.com:Modernizr/Modernizr: (70 commits)
  Fixed a typo in `testMediaQuery()`
  Added wrapflow test, in AMD format - fixes #786
  Fixes missing brackets and removes unneeded "Pre 1.2" from the user agent regex ("webOS" already covers that).
  Corrected name for `touch` (to `touchevents`) in Modernizr-caniuse mapping
  Robustisize the binary WebSocket detect. Fixes #370
  Update detect for fullscreen api. Fixes #739
  Added DOM PointerEvents test as Modernizr.pointerevents
  Moved Modernizr.pointerevents -> Modernizr.csspointer events (API break...)
  Moved Modernizr.touch -> Modernizr.touchevents (kept an alias though)
  Matches #777 in v3 land.
  Matches #774 in v3 land.
  Matches #773 in v3 land.
  whitespace
  Adds 'peerconnection' feature detection, namespaces WebRTC features together
  Tweaked csstransforms3d style test numbers to work around rounding bug in Chrome 23.0 when zoomed (#760)
  Added fileinput test mobile UA blacklist for issue #772
  Added fileinput test mobile UA blacklist for issue #772
  adding docs from alex's email.
  whitespace
  SUPERSECRET MICROSOFT REQUESTED SENSORSHIP
  ...
1e08fdf
@SlexAxton SlexAxton added a commit to SlexAxton/Modernizr that referenced this issue Feb 23, 2013
@SlexAxton SlexAxton Merge branch '3pre'
* 3pre: (58 commits)
  fill up metadata a bit more, a few new conventions
  Saving full dependecies into package.json
  Removing node_modules, adding in metadata reader, ignoring generated metadata
  remove the node modules via an ignore
  Corrected name for `touch` (to `touchevents`) in Modernizr-caniuse mapping
  Robustisize the binary WebSocket detect. Fixes #370
  Update detect for fullscreen api. Fixes #739
  Added DOM PointerEvents test as Modernizr.pointerevents
  Moved Modernizr.pointerevents -> Modernizr.csspointer events (API break...)
  Moved Modernizr.touch -> Modernizr.touchevents (kept an alias though)
  Matches #777 in v3 land.
  Matches #774 in v3 land.
  Matches #773 in v3 land.
  whitespace
  Adds 'peerconnection' feature detection, namespaces WebRTC features together
  Tweaked csstransforms3d style test numbers to work around rounding bug in Chrome 23.0 when zoomed (#760)
  Added fileinput test mobile UA blacklist for issue #772
  Added fileinput test mobile UA blacklist for issue #772
  adding docs from alex's email.
  whitespace
  ...

Conflicts:
	config-all.json
	feature-detects/css/animations.js
	feature-detects/forms/fileinput.js
	modular.html
	package.json
6f92617
@Blueblau

I'm still experiencing this issue on Windows Mobile 8, with Internet Explorer 10. If I try to do it manually with:

var elem = document.createElement('input');
elem.type = 'file';
alert(!elem.disabled);

...it still returns true... Does anyone else face this issue?

@stucox
Member
stucox commented Mar 17, 2014

@Blueblau This is why we added a user agent blacklist to Modernizr’s detect in #773:

    if(navigator.userAgent.match(/(Android (1.0|1.1|1.5|1.6|2.0|2.1))|(Windows Phone (OS 7|8.0))|(XBLWP)|(ZuneWP)|(w(eb)?OSBrowser)|(webOS)|(Kindle\/(1.0|2.0|2.5|3.0))/)) {
        return false;
    }
    var elem = createElement('input');
    elem.type = 'file';
    return !elem.disabled;

Can you confirm that you see false using this technique?

@Blueblau

Using this example, the detection works as expected, but I assumed that you already implemented this blacklist into Modernizr, since Paul mentioned the fixed about a year ago.

Thank you for your time anyways.

@patrickkettner
Member

It is, its just in the 3.0 version. The sites builder has not been updated due to the large refactoring between versions. You can either build it by following the readme or using the temporary builder at http://v3.modernizr.com

On Sat, Aug 23, 2014 at 5:16 PM, spacewolf7 notifications@github.com
wrote:

It looks like the blacklist is NOT in modernizr. Why not?

Reply to this email directly or view it on GitHub:
#772 (comment)

@patrickkettner patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015
Stuart Cox Added fileinput test mobile UA blacklist for issue #772 25e8f6c
@patrickkettner patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015
@stucox stucox Added fileinput test mobile UA blacklist for issue #772 ed7af81
@patrickkettner patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015
@SlexAxton SlexAxton Merge branch 'master' of github.com:Modernizr/Modernizr
* 'master' of github.com:Modernizr/Modernizr: (70 commits)
  Fixed a typo in `testMediaQuery()`
  Added wrapflow test, in AMD format - fixes #786
  Fixes missing brackets and removes unneeded "Pre 1.2" from the user agent regex ("webOS" already covers that).
  Corrected name for `touch` (to `touchevents`) in Modernizr-caniuse mapping
  Robustisize the binary WebSocket detect. Fixes #370
  Update detect for fullscreen api. Fixes #739
  Added DOM PointerEvents test as Modernizr.pointerevents
  Moved Modernizr.pointerevents -> Modernizr.csspointer events (API break...)
  Moved Modernizr.touch -> Modernizr.touchevents (kept an alias though)
  Matches #777 in v3 land.
  Matches #774 in v3 land.
  Matches #773 in v3 land.
  whitespace
  Adds 'peerconnection' feature detection, namespaces WebRTC features together
  Tweaked csstransforms3d style test numbers to work around rounding bug in Chrome 23.0 when zoomed (#760)
  Added fileinput test mobile UA blacklist for issue #772
  Added fileinput test mobile UA blacklist for issue #772
  adding docs from alex's email.
  whitespace
  SUPERSECRET MICROSOFT REQUESTED SENSORSHIP
  ...
de69132
@patrickkettner patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015
@SlexAxton SlexAxton Merge branch '3pre'
* 3pre: (58 commits)
  fill up metadata a bit more, a few new conventions
  Saving full dependecies into package.json
  Removing node_modules, adding in metadata reader, ignoring generated metadata
  remove the node modules via an ignore
  Corrected name for `touch` (to `touchevents`) in Modernizr-caniuse mapping
  Robustisize the binary WebSocket detect. Fixes #370
  Update detect for fullscreen api. Fixes #739
  Added DOM PointerEvents test as Modernizr.pointerevents
  Moved Modernizr.pointerevents -> Modernizr.csspointer events (API break...)
  Moved Modernizr.touch -> Modernizr.touchevents (kept an alias though)
  Matches #777 in v3 land.
  Matches #774 in v3 land.
  Matches #773 in v3 land.
  whitespace
  Adds 'peerconnection' feature detection, namespaces WebRTC features together
  Tweaked csstransforms3d style test numbers to work around rounding bug in Chrome 23.0 when zoomed (#760)
  Added fileinput test mobile UA blacklist for issue #772
  Added fileinput test mobile UA blacklist for issue #772
  adding docs from alex's email.
  whitespace
  ...

Conflicts:
	config-all.json
	feature-detects/css/animations.js
	feature-detects/forms/fileinput.js
	modular.html
	package.json
c801ba2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment