1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +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) {
return;
}
if(duration) {
// Scroll the node into view
this.listWidget.dispatchEvent({type: "tm-scroll", target: targetElement});
} else {
targetElement.scrollIntoView();
}
// Scroll the node into view
this.listWidget.dispatchEvent({type: "tm-scroll", target: targetElement});
};
ClassicStoryView.prototype.insert = function(widget) {