Skip to content

Commit

Permalink
fix: tooltips remains
Browse files Browse the repository at this point in the history
  • Loading branch information
Tsuk1ko committed Jan 4, 2025
1 parent c16b74a commit 3e54ec1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/views/Material/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ export default defineComponent({
highlightCost: {},
jsonStorageAvailable: !!JSON_STORAGE_SERVER,
suppliesStagesCurTimeUpdateTimer: null,
forceHideMduiTooltip: markRaw(
_.throttle(() => this.$$('.mdui-tooltip-open').removeClass('mdui-tooltip-open'), 100, {
trailing: false,
}),
),
};
},
watch: {
Expand Down Expand Up @@ -1900,6 +1905,9 @@ export default defineComponent({
this.initPlanner();
}
},
deactivated() {
this.forceHideMduiTooltip();
},
beforeDestroy() {
this.$root.importItemsListening = false;
this.$root.$off('import-items', this.handleImportItemsEvent);
Expand Down
14 changes: 12 additions & 2 deletions src/views/Material/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,12 @@
id="material-normal"
tag="div"
name="material-group-wrap-transition"
@before-leave="$root.transitionBeforeLeave"
@before-leave="
(...args) => {
$root.transitionBeforeLeave(...args);
forceHideMduiTooltip();
}
"
@after-leave="$root.transitionAfterLeaveBeforeEnter"
@before-enter="$root.transitionAfterLeaveBeforeEnter"
>
Expand All @@ -580,7 +585,12 @@
class="material-group-wrap"
tag="div"
name="material-group-wrap-transition"
@before-leave="$root.transitionBeforeLeave"
@before-leave="
(...args) => {
$root.transitionBeforeLeave(...args);
forceHideMduiTooltip();
}
"
@after-leave="$root.transitionAfterLeaveBeforeEnter"
@before-enter="$root.transitionAfterLeaveBeforeEnter"
>
Expand Down

0 comments on commit 3e54ec1

Please sign in to comment.