mirror of
https://github.com/readest/readest
synced 2026-04-21 13:37:44 +00:00
fix: apply disable click to paginate also for non-iframe clicks (#3818)
This commit is contained in:
parent
23d5f3363d
commit
07e3248780
1 changed files with 6 additions and 4 deletions
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue