From 7f2231d86bb72c83f50693ec96526e7d9f47dfb8 Mon Sep 17 00:00:00 2001
From: zeroinformatique
Date: Sun, 18 Oct 2020 01:12:07 +0200
Subject: viewer: fix sort order button hitbox (#272)

* viewer: fix sort order button hitbox

github: resolves #266

* viewer: fix sort order button hover color

That was a conflict between the <a> tag's color and the .link color.
I enforced .link priority over <a>

* viewer: fix sort order button hover color

TODO comment about Buefy issues---
 viewer/src/components/LdCommandSort.vue | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'viewer/src/components/LdCommandSort.vue')

diff --git a/viewer/src/components/LdCommandSort.vue b/viewer/src/components/LdCommandSort.vue
index cfaa5c1..4c246e6 100644
--- a/viewer/src/components/LdCommandSort.vue
+++ b/viewer/src/components/LdCommandSort.vue
@@ -19,8 +19,9 @@
 -->
 
 <template>
-  <b-dropdown v-model="selectedSort" :mobile-modal="false" append-to-body>
-    <a slot="trigger" class="link">
+  <!-- TODO: Find an alternative to this Buefy component; it causes focus and CSS issues -->
+  <b-dropdown v-model="selectedSort" :mobile-modal="false" append-to-body class="link" :class="$style.sortBtn">
+    <a slot="trigger">
       <fa-icon icon="sort-amount-down" size="lg" />
     </a>
     <b-dropdown-item v-for="(sort, idx) in ITEM_SORTS" :key="idx" :value="sort">
@@ -52,4 +53,8 @@ export default class LdCommandSort extends Vue {
 .dropdownLabel {
   margin-left: 0.5em;
 }
+.sortBtn > div[role="button"] {
+  width: 100%;
+  height: 100%;
+}
 </style>
-- 
cgit v1.2.3

