1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-08-11 16:24:31 +00:00

fix: no need for setTimeout

This commit is contained in:
linonetwo 2023-09-22 23:59:47 +08:00
parent 507d004a57
commit 48d2eff33c

View File

@ -134,10 +134,7 @@ PageScroller.prototype.scrollIntoView = function(element,callback,options) {
// the animation is end.
if(highlight) {
element.focus({ focusVisible: true });
// Using setTimeout to ensure the removal takes effect before adding the class again.
setTimeout(function() {
$tw.utils.addClass(element,"tc-focus-highlight");
}, 50);
$tw.utils.addClass(element,"tc-focus-highlight");
}
}
};