mirror of
https://akkoma.dev/AkkomaGang/akkoma-fe.git
synced 2024-11-13 20:14:42 +00:00
make click blocking actually work
This commit is contained in:
parent
f4b18df644
commit
fa01030641
2 changed files with 12 additions and 2 deletions
|
@ -59,6 +59,14 @@ const TimelineMenu = {
|
||||||
this.isOpen = true
|
this.isOpen = true
|
||||||
}, 25)
|
}, 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 () {
|
timelineName () {
|
||||||
const route = this.$route.name
|
const route = this.$route.name
|
||||||
if (route === 'tag-timeline') {
|
if (route === 'tag-timeline') {
|
||||||
|
|
|
@ -72,7 +72,10 @@
|
||||||
icon="chevron-down"
|
icon="chevron-down"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
<span class="click-blocker" />
|
<span
|
||||||
|
class="click-blocker"
|
||||||
|
@click="blockOpen"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Popover>
|
</Popover>
|
||||||
</template>
|
</template>
|
||||||
|
@ -135,7 +138,6 @@
|
||||||
|
|
||||||
.click-blocker {
|
.click-blocker {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
pointer-events: none;
|
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue