mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 00:46:03 +00:00
compose_recipient: Early return in on_hidden_callback if no item click.
Previously, the topic / direct message recipient input box was always focused when the compose select recipient dropdown got closed, even if the user clicked elsewhere. This resulted in unwanted trigger of onFocus event listener etc. This adds an early return to ensure focus updates only when an item is clicked.
This commit is contained in:
committed by
Tim Abbott
parent
9a29320d61
commit
2b4d2f15f2
@@ -107,6 +107,10 @@ export class DropdownWidget {
|
||||
dropdown_input_visible_selector: string;
|
||||
prefer_top_start_placement: boolean;
|
||||
|
||||
// TODO: This is only used in one widget, with no implementation
|
||||
// here, so should be generalized or reworked.
|
||||
item_clicked = false;
|
||||
|
||||
constructor(options: DropdownWidgetOptions) {
|
||||
this.widget_name = options.widget_name;
|
||||
this.widget_selector = options.widget_selector ?? `#${CSS.escape(this.widget_name)}_widget`;
|
||||
|
||||
Reference in New Issue
Block a user