mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
Improve panel mode exit cleanup
When exiting panel mode, now properly resets: - Remove zoom attribute to clear any zoom state - Scroll to top position to reset viewport This ensures a clean state when transitioning back to regular reading mode.
This commit is contained in:
@@ -529,6 +529,8 @@ export class FixedLayout extends HTMLElement {
|
|||||||
this.#currentPanels = [];
|
this.#currentPanels = [];
|
||||||
this.#hidePanelOverlay();
|
this.#hidePanelOverlay();
|
||||||
this.removeAttribute("panel-mode");
|
this.removeAttribute("panel-mode");
|
||||||
|
this.removeAttribute("zoom");
|
||||||
|
this.scrollTo(0, 0);
|
||||||
this.#render();
|
this.#render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user