fix: apply disable click to paginate also for non-iframe clicks (#3818)
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user