Bit #13
You can pass an options
object, which only has a single property, to the focus()
method to prevent scrolling on focus.
document.querySelector("#anchor").focus({ preventScroll: true,});
You can pass an options
object, which only has a single property, to the focus()
method to prevent scrolling on focus.
document.querySelector("#anchor").focus({ preventScroll: true,});