fix: apply disable click to paginate also for non-iframe clicks (#3818)

This commit is contained in:
Huang Xin 2026-04-10 18:27:17 +08:00 committed by GitHub
parent 23d5f3363d
commit 07e3248780
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -236,10 +236,12 @@ export const usePagination = (
const leftThreshold = width * 0.5;
const rightThreshold = width * 0.5;
const viewSettings = getViewSettings(bookKey);
if (clientX < leftThreshold) {
viewPagination(viewRef.current, viewSettings, 'left');
} else if (clientX > rightThreshold) {
viewPagination(viewRef.current, viewSettings, 'right');
if (!viewSettings?.disableClick) {
if (clientX < leftThreshold) {
viewPagination(viewRef.current, viewSettings, 'left');
} else if (clientX > rightThreshold) {
viewPagination(viewRef.current, viewSettings, 'right');
}
}
}
}