Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
lightbox: Show first media element on hotkey activation.
Karl Stolley2e26c3bb9d8d
diff --git a/web/src/lightbox.ts b/web/src/lightbox.tsindex 05d2e88c8e8..f041d93c4f5 100644--- a/web/src/lightbox.ts+++ b/web/src/lightbox.ts@@ -469,7 +469,10 @@ export function show_from_selected_message(): void {if ($media.length !== 0) {const open_media = build_open_media_function(undefined);- open_media($media);+ // Since this function is only called from the "show_lightbox"+ // hotkey, we don't have a selected image to load. Therefore,+ // we show the first one returned from the traversal above.+ open_media($media.first());}}