Browse Source

fix fullscreen for embedded decks

Hakim El Hattab 5 năm trước cách đây
mục cha
commit
b7f480c908
5 tập tin đã thay đổi với 35 bổ sung5 xóa
  1. 30 0
      dist/reset.css
  2. 1 1
      dist/reveal.esm.js
  3. 1 1
      dist/reveal.js
  4. 1 1
      js/controllers/keyboard.js
  5. 2 2
      js/utils/util.js

+ 30 - 0
dist/reset.css

@@ -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;
+}

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/reveal.esm.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/reveal.js


+ 1 - 1
js/controllers/keyboard.js

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

+ 2 - 2
js/utils/util.js

@@ -115,9 +115,9 @@ export const closestParent = ( target, selector ) => {
  * @see http://fullscreen.spec.whatwg.org/
  * @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
 	let requestMethod = element.requestFullscreen ||

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác