fix: avoid stale values in relocate handler, closes #736 (#738)

This commit is contained in:
Huang Xin
2025-03-28 13:33:51 +08:00
committed by GitHub
parent 1c122752bb
commit bd9c7b459c
@@ -78,6 +78,7 @@ const FootnotePopup: React.FC<FootnotePopupProps> = ({ bookKey, bookDoc }) => {
const { view } = detail;
view.addEventListener('relocate', () => {
const { renderer } = view as FoliateView;
const viewSettings = getViewSettings(bookKey)!;
if (viewSettings.vertical) {
setResponsiveWidth(getResponsivePopupSize(renderer.viewSize, true));
} else {