Skip to content

Commit 19a61cf

Browse files
authored
Fix account settings tooltip (#921)
1 parent a9aa3b7 commit 19a61cf

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

frontend/src/components/SettingsAccount.vue

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,17 @@ const actuallyDeleteAccount = async () => {
226226
<label class="tooltip-label mt-4 flex items-center pl-4">
227227
<div class="flex w-full max-w-2xs gap-2">{{ t('label.preferredEmail') }}
228228
<span class="relative cursor-help" role="tooltip" aria-labelledby="preferred-email-help-tooltip">
229-
<icon-info-circle class="tooltip-icon w-4" aria-hidden="true"/>
229+
<icon-info-circle class="tooltip-icon w-4" aria-hidden="true"/>
230230
<span class="tooltip hidden">
231231
<transition>
232-
<tool-tip id="preferred-email-help-tooltip" class="tooltip left-[-8.5rem] w-72" :content="t('text.preferredEmailHelp')"/>
232+
<tool-tip
233+
id="preferred-email-help-tooltip"
234+
class="tooltip left-[-8.5rem] w-72"
235+
:content="t('text.preferredEmailHelp')"
236+
/>
233237
</transition>
234238
</span>
235-
</span>
239+
</span>
236240
</div>
237241
<select v-model="activePreferredEmail" class="w-full rounded-md" data-testid="settings-account-email-select">
238242
<option v-for="email in availableEmails" :key="email" :value="email">{{ email }}</option>
@@ -375,3 +379,16 @@ const actuallyDeleteAccount = async () => {
375379
@close="closeModals"
376380
></confirmation-modal>
377381
</template>
382+
383+
<style scoped>
384+
/* If the device does not support hover (i.e. mobile) then make it activate on focus within */
385+
@media (hover: none) {
386+
.tooltip-label:focus-within .tooltip {
387+
display: block;
388+
}
389+
}
390+
391+
.tooltip-icon:hover ~ .tooltip {
392+
display: block;
393+
}
394+
</style>

0 commit comments

Comments
 (0)