1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-14 05:44:50 +00:00

Fix navigation vertical position when duration is zero

Fixes #8428
This commit is contained in:
Jeremy Ruston 2024-07-28 14:20:37 +01:00
parent 95863ae97b
commit 685d831cb1

View File

@ -30,12 +30,8 @@ ClassicStoryView.prototype.navigateTo = function(historyInfo) {
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) { if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
return; return;
} }
if(duration) { // Scroll the node into view
// Scroll the node into view this.listWidget.dispatchEvent({type: "tm-scroll", target: targetElement});
this.listWidget.dispatchEvent({type: "tm-scroll", target: targetElement});
} else {
targetElement.scrollIntoView();
}
}; };
ClassicStoryView.prototype.insert = function(widget) { ClassicStoryView.prototype.insert = function(widget) {