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

fullscreen FD out of date #739

Closed
miketaylr opened this Issue Nov 1, 2012 · 7 comments

Comments

Projects
None yet
6 participants
@miketaylr

miketaylr commented Nov 1, 2012

https://github.com/Modernizr/Modernizr/blob/master/feature-detects/fullscreen-api.js

There is no cancelFullScreen on document anymore. There is document.exitFullscreen however.

@miketaylr

This comment has been minimized.

miketaylr commented Nov 1, 2012

Firefox still uses mozCancelFullScreen, Safari uses webkitCancelFullScreen. Chrome has updated to webkitExitFullscreen and Opera uses exitFullscreen.

Fun for the whole family.

@ryanseddon

This comment has been minimized.

Member

ryanseddon commented Nov 2, 2012

Ah thanks I reckon we do a check for exitFullscreen first then fallback to cancel.

Modernizr.addTest('fullscreen',function(){
     var eFS = Modernizr.prefixed("exitFullscreen", document, false);

     if(eFS) {
          return !!eFS;
     } else {
          return Modernizr.prefixed("cancelFullScreen", document, false);
     }
});

Thoughts?

@aFarkas

This comment has been minimized.

Member

aFarkas commented Nov 2, 2012

This should also work:

Modernizr.addTest('fullscreen', !!(Modernizr.prefixed("exitFullscreen", document, false) || Modernizr.prefixed("cancelFullScreen", document, false));

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

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

@haeric haeric referenced this issue Mar 26, 2013

Closed

Fullscreen API #405

@hexalys

This comment has been minimized.

hexalys commented May 28, 2014

I am seeing a false positive on the Android Stock Browser 4.4.2 (Mac SDK Emulator).

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 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
@annevk

This comment has been minimized.

Contributor

annevk commented Sep 14, 2015

https://modernizr.com/news/modernizr-3-new-release-site mentions this as properties existing on window which seems bogus... Also, https://fullscreen.spec.whatwg.org/ is the latest standard. And window/document.cancelFullscreen doesn't exist.

@patrickkettner

This comment has been minimized.

Member

patrickkettner commented Sep 14, 2015

Hey @annevk! Thanks a lot for the heads up

how is this?

  • fullscreen detect has been updated to use document.exitFullScreen rather than the prefixed versions of document.cancelFullScreen as per the latest spec (#739)
@annevk

This comment has been minimized.

Contributor

annevk commented Sep 14, 2015

Looks better, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment