mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: correctly destroy menu/tooltip when removed from dom
This fix will ensure we correctly play the close/destroy sequence in this situation.
This commit is contained in:
@@ -25,6 +25,10 @@ export default class DMenu extends Component {
|
||||
registerTrigger = modifier((element) => {
|
||||
this.menuInstance.trigger = element;
|
||||
this.options.onRegisterApi?.(this.menuInstance);
|
||||
|
||||
return () => {
|
||||
this.menuInstance.destroy();
|
||||
};
|
||||
});
|
||||
|
||||
get menuId() {
|
||||
|
||||
Reference in New Issue
Block a user