1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-22 06:56:52 +00:00

Update pop.js to use tv-inherit-storyview-scroll variable

This commit is contained in:
Simon Huber 2024-10-20 18:27:16 +02:00 committed by GitHub
parent a0caa0f12d
commit 1aca53f9cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -24,7 +24,7 @@ PopStoryView.prototype.navigateTo = function(historyInfo) {
var listItemWidget = this.listWidget.children[listElementIndex],
targetElement = listItemWidget.findFirstDomNode();
// Abandon if the list entry isn't a DOM element (it might be a text node)
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE || listItemWidget.getVariable("tv-inherit-storyview-scroll") === "yes") {
return;
}
// Scroll the node into view