MediaModal: fix hotkey navigation
Fixes https://gitlab.com/soapbox-pub/soapbox/-/issues/1209
This commit is contained in:
parent
c4d3719918
commit
16f52538ce
|
@ -83,7 +83,7 @@ const MediaModal: React.FC<IMediaModal> = (props) => {
|
|||
return () => {
|
||||
window.removeEventListener('keydown', handleKeyDown);
|
||||
};
|
||||
}, []);
|
||||
}, [index]);
|
||||
|
||||
const getIndex = () => {
|
||||
return index !== null ? index : props.index;
|
||||
|
|
Loading…
Reference in New Issue