lightbox: Make `v` close the lightbox during Pan & Zoom.

When Pan & Zoom (canvas) is enabled, the `v` hotkey does not work due to
`LightboxCanvas` overriding the `keydown` event. Add `v` as an option in
the new listener.

Fix #9777.
This commit is contained in:
Marco Burstein 2018-07-19 15:36:02 -07:00 committed by Tim Abbott
parent c3b1381c2a
commit 3ae5e40f8f
1 changed files with 2 additions and 0 deletions

View File

@ -158,6 +158,8 @@ var LightboxCanvas = (function () {
} else if (e.key === "z" || e.key === '-') {
funcs.setZoom(meta, '-');
funcs.displayImage(canvas, context, meta);
} else if (e.key === 'v') {
overlays.close_overlay('lightbox');
}
e.preventDefault();
e.stopPropagation();