fix fullscreen for embedded decks

This commit is contained in:
Hakim El Hattab 2020-05-05 20:54:40 +02:00
parent c4870362d9
commit b7f480c908
5 changed files with 37 additions and 7 deletions

30
dist/reset.css vendored Normal file
View file

@ -0,0 +1,30 @@
/* http://meyerweb.com/eric/tools/css/reset/
v4.0 | 20180602
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
main, menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, main, menu, nav, section {
display: block;
}

4
dist/reveal.esm.js vendored

File diff suppressed because one or more lines are too long

4
dist/reveal.js vendored

File diff suppressed because one or more lines are too long

View file

@ -333,7 +333,7 @@ export default class Keyboard {
} }
// F // F
else if( keyCode === 70 ) { else if( keyCode === 70 ) {
enterFullscreen(); enterFullscreen( config.embedded ? this.Reveal.getViewportElement() : document.documentElement );
} }
// A // A
else if( keyCode === 65 ) { else if( keyCode === 65 ) {

View file

@ -115,9 +115,9 @@ export const closestParent = ( target, selector ) => {
* @see http://fullscreen.spec.whatwg.org/ * @see http://fullscreen.spec.whatwg.org/
* @see https://developer.mozilla.org/en-US/docs/DOM/Using_fullscreen_mode * @see https://developer.mozilla.org/en-US/docs/DOM/Using_fullscreen_mode
*/ */
export const enterFullscreen = () => { export const enterFullscreen = element => {
let element = document.documentElement; element = element || document.documentElement;
// Check which implementation is available // Check which implementation is available
let requestMethod = element.requestFullscreen || let requestMethod = element.requestFullscreen ||