mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-29 15:47:57 +02:00
Fix a regression, from PR 5356, that breaks all scrolling in PresentationMode
*This regressed in PR 5356.* Rather than just backing out the offending code, this patch restores scrolling in PresentationMode by making the `overflow: hidden;` check optional and letting the callers that need it (e.g. `PDFFindController`) opt-in to use it.
This commit is contained in:
parent
c4403e6fd2
commit
9fc8e1ea25
2 changed files with 12 additions and 7 deletions
|
@ -325,10 +325,12 @@ var PDFFindController = (function PDFFindControllerClosure() {
|
|||
pageIndex, index, elements, beginIdx, endIdx) {
|
||||
if (this.selected.matchIdx === index &&
|
||||
this.selected.pageIdx === pageIndex) {
|
||||
scrollIntoView(elements[beginIdx], {
|
||||
var spot = {
|
||||
top: FIND_SCROLL_OFFSET_TOP,
|
||||
left: FIND_SCROLL_OFFSET_LEFT
|
||||
});
|
||||
};
|
||||
scrollIntoView(elements[beginIdx], spot,
|
||||
/* skipOverflowHiddenElements = */ true);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue