mirror of
https://github.com/flarum/core.git
synced 2025-08-11 10:55:47 +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();
|
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