Hyku: A multi-tenant Hyrax application built on the latest and greatest Samvera community components. Brought to you by the Hydra-in-a-Box project partners and IMLS; maintained by the Hyku Interest Group.
On Hyku v5.1.0, Chrome and other browsers automatically jump to the top of PDF.js iframe when the iframe src includes a trailing "#" (indicating an anchor link).
This "#" should only be included if search query parameters exist.
Automatically jumping to the top of the PDF.js iframe skips masthead, navigation, work title and other content which the user may want to see first. Also, this behavior is inconsistent with the behavior of work show pages that do not contain PDF.js iframes.
Expected behavior
Chrome and other browsers render top of HTML document in viewport after loading pages with PDF.js iframes.
Actual behavior
Chrome and other browsers automatically jump to top of PDF.js iframes.
Descriptive summary
On Hyku v5.1.0, Chrome and other browsers automatically jump to the top of PDF.js iframe when the iframe src includes a trailing "#" (indicating an anchor link).
This "#" should only be included if search query parameters exist.
Fix applied to
pdf_js_helper.rb
here: https://github.com/Georgetown-University-Libraries/GU-Hyku/commit/0c650b503e6eafb2da80986a89a0b2dc365003bfRationale
Automatically jumping to the top of the PDF.js iframe skips masthead, navigation, work title and other content which the user may want to see first. Also, this behavior is inconsistent with the behavior of work show pages that do not contain PDF.js iframes.
Expected behavior
Chrome and other browsers render top of HTML document in viewport after loading pages with PDF.js iframes.
Actual behavior
Chrome and other browsers automatically jump to top of PDF.js iframes.