We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 167ef4c + 829a6a6 commit 4f62957Copy full SHA for 4f62957
src/pat/inject/inject.js
@@ -492,7 +492,7 @@ const inject = {
492
// 2) getting the element to scroll to (if not "top")
493
const scroll_target = ["top", "target"].includes(cfg.scroll)
494
? cfg.$target[0]
495
- : $(cfg.scroll, $injected)[0];
+ : $injected.findInclusive(cfg.scroll)[0];
496
497
const scroll_container = dom.find_scroll_container(
498
scroll_target,
@@ -502,7 +502,7 @@ const inject = {
502
503
if (cfg.scroll === "top") {
504
dom.scroll_to_top(scroll_container);
505
- } else {
+ } else if (scroll_target) {
506
dom.scroll_to_element(scroll_target, scroll_container);
507
}
508
0 commit comments