diff options
| author | Shpuld Shpuldson <shp@cock.li> | 2021-01-05 13:58:52 +0200 |
|---|---|---|
| committer | Shpuld Shpuldson <shp@cock.li> | 2021-01-05 13:58:52 +0200 |
| commit | ab2c2c66bfe96571d14cff4b8c69fe0c90d5a3c7 (patch) | |
| tree | d35c6958a49431358e131601ca31f753c804fd99 /src/components/timeline_menu | |
| parent | 5e96260a4f855e2d93915c1b428a7209a882c8cb (diff) | |
| parent | 3e7d1fbf23b5ca1b382381b49affc481404137da (diff) | |
Merge branch 'develop' into feat/report-notification
Diffstat (limited to 'src/components/timeline_menu')
| -rw-r--r-- | src/components/timeline_menu/timeline_menu.js | 8 | ||||
| -rw-r--r-- | src/components/timeline_menu/timeline_menu.vue | 22 |
2 files changed, 25 insertions, 5 deletions
diff --git a/src/components/timeline_menu/timeline_menu.js b/src/components/timeline_menu/timeline_menu.js index ef8a5813..8d6a58b1 100644 --- a/src/components/timeline_menu/timeline_menu.js +++ b/src/components/timeline_menu/timeline_menu.js @@ -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') { diff --git a/src/components/timeline_menu/timeline_menu.vue b/src/components/timeline_menu/timeline_menu.vue index c46531be..3c86842b 100644 --- a/src/components/timeline_menu/timeline_menu.vue +++ b/src/components/timeline_menu/timeline_menu.vue @@ -65,10 +65,16 @@ slot="trigger" class="title timeline-menu-title" > - <span>{{ timelineName() }}</span> - <FAIcon - size="sm" - icon="chevron-down" + <span class="timeline-title">{{ timelineName() }}</span> + <span> + <FAIcon + size="sm" + icon="chevron-down" + /> + </span> + <span + class="click-blocker" + @click="blockOpen" /> </div> </Popover> @@ -117,8 +123,9 @@ cursor: pointer; user-select: none; width: 100%; + display: flex; - span { + .timeline-menu-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -128,6 +135,11 @@ margin-left: 0.6em; transition: transform 100ms; } + + .click-blocker { + cursor: default; + flex-grow: 1; + } } &.open .timeline-menu-title svg { |
