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

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

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

View File

@ -27,7 +27,7 @@ ClassicStoryView.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