mirror of
https://github.com/flarum/core.git
synced 2025-08-09 18:07:02 +02:00
fix: close dropdown when focusing out
This commit is contained in:
@@ -123,6 +123,13 @@ export default class Dropdown<CustomAttrs extends IDropdownAttrs = IDropdownAttr
|
||||
|
||||
m.redraw();
|
||||
});
|
||||
|
||||
// Focusing out of the dropdown should close it.
|
||||
this.$().on('focusout', (e) => {
|
||||
if (e.relatedTarget && !this.$().has(e.relatedTarget).length) {
|
||||
this.$().trigger('hidden.bs.dropdown');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user