mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-09 04:06:27 -04:00
Ensure scrolling action works when jumping in ToC list
Former-commit-id: 6415494c22071c7ed990fdbcbf44274f79b76488 [formerly 81c1ba511ccbc8605987d64cf0db596f6dbf34a2] Former-commit-id: 1f5df33782ff5a484277c3acd850fd46a81b8f30
This commit is contained in:
parent
29f3a1bbfd
commit
f8f0f6b3bd
@ -3414,7 +3414,10 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'util', 'utf8', 'images', 'cooki
|
|||||||
listElement.addEventListener('click', function () {
|
listElement.addEventListener('click', function () {
|
||||||
var iframeWin = document.getElementById('articleContent').contentWindow;
|
var iframeWin = document.getElementById('articleContent').contentWindow;
|
||||||
iframeWin.location.hash = this.dataset.headingId;
|
iframeWin.location.hash = this.dataset.headingId;
|
||||||
iframeWin.onscroll();
|
iframeWin.scrollBy(0, -5);
|
||||||
|
setTimeout(function () {
|
||||||
|
iframeWin.scrollBy(0, 5);
|
||||||
|
}, 250);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user