mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
Refined close filter dropdown behavior
closes https://github.com/TryGhost/Team/issues/976 Dropdown's `onClose` action was previously fired from the `close` function instead of when the actual close happened when animation ended for dropdown close. Also, the `close` action of dropdown is fired irrespective of dropdown is open, as we close all dropdowns and menus whenever a new transition happens, so it caused flicker on the screen.
This commit is contained in:
parent
d691874c5f
commit
9b5cd1ac8b
@ -37,6 +37,7 @@ export default Component.extend(DropdownMixin, {
|
||||
if (event.animationName === 'fade-out' && this.closing) {
|
||||
this.set('isOpen', false);
|
||||
this.set('closing', false);
|
||||
this.onClose?.();
|
||||
}
|
||||
});
|
||||
|
||||
@ -61,7 +62,6 @@ export default Component.extend(DropdownMixin, {
|
||||
|
||||
close() {
|
||||
this.set('closing', true);
|
||||
this.onClose?.();
|
||||
if (this.button) {
|
||||
this.set('button.isOpen', false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user