fix: no need for setTimeout

This commit is contained in:
linonetwo 2023-09-22 23:59:47 +08:00
parent 507d004a57
commit 48d2eff33c
1 changed files with 1 additions and 4 deletions

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");
}
}
};