Freeze scroll position when cursing with keyboard
This commit is contained in:
parent
a8f88c5d40
commit
458f36f4a2
@ -34,14 +34,14 @@ export default function PhotoLinks({
|
||||
case 'J':
|
||||
if (previousPhoto) {
|
||||
setNextPhotoAnimation?.(ANIMATION_RIGHT);
|
||||
router.push(pathForPhoto(previousPhoto, tag));
|
||||
router.push(pathForPhoto(previousPhoto, tag), { scroll: false });
|
||||
}
|
||||
break;
|
||||
case 'ARROWRIGHT':
|
||||
case 'L':
|
||||
if (nextPhoto) {
|
||||
setNextPhotoAnimation?.(ANIMATION_LEFT);
|
||||
router.push(pathForPhoto(nextPhoto, tag));
|
||||
router.push(pathForPhoto(nextPhoto, tag), { scroll: false });
|
||||
}
|
||||
break;
|
||||
case 'ESCAPE':
|
||||
|
||||
Loading…
Reference in New Issue
Block a user