diff --git a/website/client/src/app.vue b/website/client/src/app.vue index 7aec979504..0ebc5df4dc 100644 --- a/website/client/src/app.vue +++ b/website/client/src/app.vue @@ -261,6 +261,12 @@ export default { this.$root.$emit('bv::show::modal', 'buy-modal'); }); + this.$root.$on('bv::modal::hidden', event => { + if (event.componentId === 'buy-modal') { + this.$root.$emit('buyModal::hidden', this.selectedItemToBuy.key); + } + }); + this.$root.$on('selectMembersModal::showItem', item => { this.selectedSpellToBuy = item; this.$root.$emit('bv::show::modal', 'select-member-modal'); diff --git a/website/client/src/components/shops/quests/index.vue b/website/client/src/components/shops/quests/index.vue index 62bb324dcc..4a1a1a98fc 100644 --- a/website/client/src/components/shops/quests/index.vue +++ b/website/client/src/components/shops/quests/index.vue @@ -513,6 +513,12 @@ export default { section: this.$t('shops'), }); await this.$store.dispatch('worldState:getWorldState'); + + this.$root.$on('bv::modal::hidden', event => { + if (event.componentId === 'buy-quest-modal') { + this.$root.$emit('buyModal::hidden', this.selectedItemToBuy.key); + } + }); }, methods: { questItems (category, sortBy, searchBy, hideLocked, hidePinned) { diff --git a/website/client/src/components/shops/shopItem.vue b/website/client/src/components/shops/shopItem.vue index 9f2819f92a..d88d078ca9 100644 --- a/website/client/src/components/shops/shopItem.vue +++ b/website/client/src/components/shops/shopItem.vue @@ -6,6 +6,7 @@ tabindex="0" @click="click()" @keypress.enter="click()" + @blur="blur" >
{ + if (this.$refs && this.$refs.popover && itemKey === this.item.key) { + this.$refs.popover.$emit('close'); + this.$refs.popover.$emit('disable'); + } + }); + }, methods: { click () { this.$emit('click', {}); }, + blur () { + this.$refs.popover.$emit('enable'); + }, getPrice () { if (this.item.unlockCondition && this.item.unlockCondition.condition === 'party invite' && !this.owned) return this.item.unlockCondition.text(); if (this.price === -1) { diff --git a/website/client/src/components/shops/timeTravelers/index.vue b/website/client/src/components/shops/timeTravelers/index.vue index 3743f78765..9cf84afd28 100644 --- a/website/client/src/components/shops/timeTravelers/index.vue +++ b/website/client/src/components/shops/timeTravelers/index.vue @@ -417,6 +417,11 @@ export default { this.$root.$on('buyModal::boughtItem', () => { this.backgroundUpdate = new Date(); }); + this.$root.$on('bv::modal::hidden', event => { + if (event.componentId === 'buy-quest-modal') { + this.$root.$emit('buyModal::hidden', this.selectedItemToBuy.key); + } + }); }, beforeDestroy () { this.$root.$off('buyModal::boughtItem');