Skip to content

Commit

Permalink
Fix footer not hidden when Talk sidebar is shown
Browse files Browse the repository at this point in the history
When the Talk sidebar is shown the footer in public pages is moved into
the "#app-content" element, so this needs to be taken into account when
hiding the footer element.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
  • Loading branch information
danxuliu committed Jun 27, 2022
1 parent 40ebf9b commit e01afb8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions js/files_pdfviewer-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/files_pdfviewer-public.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion src/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ window.addEventListener('DOMContentLoaded', function() {
const page = location.hash.split('page=')[1] || 0
const contentElmt = document.getElementById('files-public-content')
const sharingTokenElmt = document.getElementById('sharingToken')
const footerElmt = document.querySelector('body > footer')
// By default the footer is a direct child of the body, but if the Talk
// sidebar is loaded it is moved into the app content. In all cases the
// footer is hidden to give the PDF viewer the full height.
const footerElmt = document.querySelector('body > footer') || document.querySelector('#app-content > footer')
const mainContent = document.querySelector('#content')

const sharingToken = sharingTokenElmt.value
Expand Down

0 comments on commit e01afb8

Please sign in to comment.