dropdown_widget: Fix click event being triggered multiple times.

Reset event handlers attached to the dropdown widget and by removing
it from DOM.

User is unlikely to use the same dropdown multiple times, even if
they do, the operation is fast.
This commit is contained in:
Aman Agrawal 2024-08-20 11:06:04 +00:00 committed by Tim Abbott
parent 82d3058b53
commit 7f38c95384
1 changed files with 1 additions and 0 deletions

View File

@ -429,6 +429,7 @@ export class DropdownWidget {
$(this.widget_selector).trigger("focus");
}
this.on_hidden_callback(instance);
instance.destroy();
},
...this.tippy_props,
});