make click blocking actually work

fix/private-mode-error-handling
Shpuld Shpuldson 4 years ago
parent f4b18df644
commit fa01030641

@ -59,6 +59,14 @@ const TimelineMenu = {
this.isOpen = true
}, 25)
},
blockOpen (event) {
// For the blank area inside the button element.
// Just setting @click.stop="" makes unintuitive behavior when
// menu is open and clicking on the blank area doesn't close it.
if (!this.isOpen) {
event.stopPropagation()
}
},
timelineName () {
const route = this.$route.name
if (route === 'tag-timeline') {

@ -72,7 +72,10 @@
icon="chevron-down"
/>
</span>
<span class="click-blocker" />
<span
class="click-blocker"
@click="blockOpen"
/>
</div>
</Popover>
</template>
@ -135,7 +138,6 @@
.click-blocker {
cursor: default;
pointer-events: none;
flex-grow: 1;
}
}

Loading…
Cancel
Save