fullscreen FD out of date #739

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

Projects

None yet

6 participants

@miketaylr

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

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

Fun for the whole family.

@ryanseddon
Member

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
Member
aFarkas commented Nov 2, 2012

This should also work:

Modernizr.addTest('fullscreen', !!(Modernizr.prefixed("exitFullscreen", document, false) || Modernizr.prefixed("cancelFullScreen", document, false));
@SlexAxton SlexAxton pushed a commit to SlexAxton/Modernizr that referenced this issue Feb 14, 2013
@ryanseddon ryanseddon Update detect for fullscreen api. Fixes #739 c411c64
@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
This was referenced Mar 26, 2013
@hexalys
hexalys commented May 28, 2014

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

@patrickkettner patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015
@ryanseddon ryanseddon Update detect for fullscreen api. Fixes #739 3248a7b
@patrickkettner patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015
@ryanseddon ryanseddon Update detect for fullscreen api. Fixes #739 c547438
@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
@annevk
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
Member

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