fix: no need for setTimeout
This commit is contained in:
parent
507d004a57
commit
48d2eff33c
|
@ -134,10 +134,7 @@ PageScroller.prototype.scrollIntoView = function(element,callback,options) {
|
||||||
// the animation is end.
|
// the animation is end.
|
||||||
if(highlight) {
|
if(highlight) {
|
||||||
element.focus({ focusVisible: true });
|
element.focus({ focusVisible: true });
|
||||||
// Using setTimeout to ensure the removal takes effect before adding the class again.
|
$tw.utils.addClass(element,"tc-focus-highlight");
|
||||||
setTimeout(function() {
|
|
||||||
$tw.utils.addClass(element,"tc-focus-highlight");
|
|
||||||
}, 50);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue