mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
Paginator: fix scroll offset when tabbing
This commit is contained in:
@@ -519,6 +519,10 @@ export class Paginator extends HTMLElement {
|
||||
doc.addEventListener('touchstart', this.#onTouchStart.bind(this), opts)
|
||||
doc.addEventListener('touchmove', this.#onTouchMove.bind(this), opts)
|
||||
doc.addEventListener('touchend', this.#onTouchEnd.bind(this))
|
||||
|
||||
doc.addEventListener('focusin', e =>
|
||||
// NOTE: `requestAnimationFrame` is needed in WebKit
|
||||
requestAnimationFrame(() => this.scrollToAnchor(e.target)))
|
||||
})
|
||||
|
||||
this.#mediaQueryListener = () => {
|
||||
|
||||
Reference in New Issue
Block a user