mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-08 02:52:39 -05:00
Fixed cancel button clearing post selection
fixes https://github.com/TryGhost/Team/issues/3004
This commit is contained in:
parent
7a6670a993
commit
d0cd82cc6f
1 changed files with 6 additions and 2 deletions
|
@ -33,8 +33,8 @@ export default class GhContextMenu extends Component {
|
|||
return;
|
||||
case 'default':
|
||||
this.isOpen = false;
|
||||
this.selectionList.unfreeze();
|
||||
this.#closeModal();
|
||||
this.selectionList.unfreeze();
|
||||
this.state = state;
|
||||
return;
|
||||
case 'open':
|
||||
|
@ -147,7 +147,11 @@ export default class GhContextMenu extends Component {
|
|||
|
||||
this.#modal = this.modals.open(Modal, data);
|
||||
this.#modal.then(() => {
|
||||
this.setState('default');
|
||||
// We need to delay a little bit for the click event to be processed
|
||||
// Since the click event is bubbling back to window, where it will trigger a list deselect
|
||||
setTimeout(() => {
|
||||
this.setState('default');
|
||||
}, 10);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue