From eb6714f59bdf79e660dbf93f7605be4c1faadad9 Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Wed, 2 May 2018 10:45:59 +0200 Subject: [PATCH] [FIX] website_slides: slide in fullscreen needs to have the navbar Display a slide, enter fullscreen mode Make the navigation bar appear. Now, try to push on any button of the nav bar Before this commit, none of the button work This is because the fullscreen mode is handled by the browser, and won't let any non-fullscreen elements be interactive After this commit, the nav bar is part of the element that are in fullscreen And the button work OPW 1839503 closes #24522 --- .../static/lib/pdfslidesviewer/PDFSlidesViewer.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/addons/website_slides/static/lib/pdfslidesviewer/PDFSlidesViewer.js b/addons/website_slides/static/lib/pdfslidesviewer/PDFSlidesViewer.js index d5e7266930c..f313a37dfa3 100644 --- a/addons/website_slides/static/lib/pdfslidesviewer/PDFSlidesViewer.js +++ b/addons/website_slides/static/lib/pdfslidesviewer/PDFSlidesViewer.js @@ -147,12 +147,22 @@ var PDFSlidesViewer = (function(){ PDFSlidesViewer.prototype.toggleFullScreenFooter = function(){ if(document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement) { - $('div#PDFViewer > div.navbar-fixed-bottom').toggleClass('oe_show_footer'); + var $navBarFooter = $('div#PDFViewer > div.navbar-fixed-bottom'); + $navBarFooter.toggleClass('oe_show_footer'); + + if ($navBarFooter.css('display') === 'none') { + $navBarFooter.css('display', 'block'); + $('div#PDFViewer').css('padding-bottom', '50px'); + } else { + $navBarFooter.css('display', 'none'); + $('div#PDFViewer').css('padding-bottom', '0'); + } } } PDFSlidesViewer.prototype.toggleFullScreen = function(){ - var el = this.canvas.parentNode; + // The canvas and the navigation bar needs to be fullscreened + var el = this.canvas.parentNode.parentNode; var isFullscreenAvailable = document.fullscreenEnabled || document.mozFullScreenEnabled || document.webkitFullscreenEnabled || document.msFullscreenEnabled || false; if(isFullscreenAvailable){ // Full screen supported