New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

Comments

Projects
None yet
5 participants
@paulirish
Member

paulirish commented Dec 22, 2012

stucox pushed a commit to stucox/Modernizr that referenced this issue Dec 29, 2012

stucox added a commit to stucox/Modernizr that referenced this issue Dec 29, 2012

paulirish added a commit that referenced this issue Jan 7, 2013

Merge pull request #773 from stucox/master
Added fileinput test mobile UA blacklist for issue #772
@paulirish

This comment has been minimized.

Member

paulirish commented Jan 7, 2013

fixed by #773

@paulirish paulirish closed this Jan 7, 2013

@viljamis

This comment has been minimized.

Contributor

viljamis commented Jan 8, 2013

This is great news!

SlexAxton pushed a commit to SlexAxton/Modernizr that referenced this issue Feb 14, 2013

SlexAxton pushed a commit to SlexAxton/Modernizr that referenced this issue Feb 14, 2013

paulirish added a commit to SlexAxton/Modernizr that referenced this issue Feb 14, 2013

Merge pull request Modernizr#773 from stucox/master
Added fileinput test mobile UA blacklist for issue Modernizr#772

SlexAxton added a commit to SlexAxton/Modernizr that referenced this issue Feb 23, 2013

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 Modernizr#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 Modernizr#370
  Update detect for fullscreen api. Fixes Modernizr#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 Modernizr#777 in v3 land.
  Matches Modernizr#774 in v3 land.
  Matches Modernizr#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 (Modernizr#760)
  Added fileinput test mobile UA blacklist for issue Modernizr#772
  Added fileinput test mobile UA blacklist for issue Modernizr#772
  adding docs from alex's email.
  whitespace
  SUPERSECRET MICROSOFT REQUESTED SENSORSHIP
  ...

SlexAxton added a commit to SlexAxton/Modernizr that referenced this issue Feb 23, 2013

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 Modernizr#370
  Update detect for fullscreen api. Fixes Modernizr#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 Modernizr#777 in v3 land.
  Matches Modernizr#774 in v3 land.
  Matches Modernizr#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 (Modernizr#760)
  Added fileinput test mobile UA blacklist for issue Modernizr#772
  Added fileinput test mobile UA blacklist for issue Modernizr#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
@kluplau

This comment has been minimized.

kluplau commented Mar 17, 2014

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

This comment has been minimized.

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?

@kluplau

This comment has been minimized.

kluplau commented Mar 17, 2014

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

This comment has been minimized.

Member

patrickkettner commented Aug 23, 2014

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 pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015

patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015

patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015

Merge pull request Modernizr#773 from stucox/master
Added fileinput test mobile UA blacklist for issue Modernizr#772

patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015

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 Modernizr#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 Modernizr#370
  Update detect for fullscreen api. Fixes Modernizr#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 Modernizr#777 in v3 land.
  Matches Modernizr#774 in v3 land.
  Matches Modernizr#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 (Modernizr#760)
  Added fileinput test mobile UA blacklist for issue Modernizr#772
  Added fileinput test mobile UA blacklist for issue Modernizr#772
  adding docs from alex's email.
  whitespace
  SUPERSECRET MICROSOFT REQUESTED SENSORSHIP
  ...

patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015

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 Modernizr#370
  Update detect for fullscreen api. Fixes Modernizr#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 Modernizr#777 in v3 land.
  Matches Modernizr#774 in v3 land.
  Matches Modernizr#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 (Modernizr#760)
  Added fileinput test mobile UA blacklist for issue Modernizr#772
  Added fileinput test mobile UA blacklist for issue Modernizr#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment