Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
scroll: Correct element checks before activation.
Karl Stolleyefa3c4a2c67c
diff --git a/web/src/messages_overlay_ui.ts b/web/src/messages_overlay_ui.tsindex c5fee8a891f..0c51d79613a 100644--- a/web/src/messages_overlay_ui.ts+++ b/web/src/messages_overlay_ui.ts@@ -150,10 +150,10 @@ function initialize_focus(event_name: string, context: Context): void {}function scroll_to_element($element: JQuery, context: Context): void {- if ($element.length > 0) {+ if ($element.length === 0) {return;}- if ($element.length > 0) {+ if ($element.children.length === 0) {return;}activate_element($element[0].children[0] as HTMLElement, context);