mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
Revert "Add <button> and focus styles for keyboard users" (#11089)
This commit is contained in:
@@ -3,7 +3,7 @@ A simplified dropdown component that doesn't rely on buttons as toggles like bo
|
||||
-->
|
||||
|
||||
<template lang="pug">
|
||||
.habitica-menu-dropdown.dropdown(@click="toggleDropdown()", @keypress.enter.space.stop.prevent="toggleDropdown()", role="button", tabindex="0", :class="{open: isOpen}", :aria-pressed="isPressed")
|
||||
.habitica-menu-dropdown.dropdown(@click="toggleDropdown()", :class="{open: isOpen}")
|
||||
.habitica-menu-dropdown-toggle
|
||||
slot(name="dropdown-toggle")
|
||||
.dropdown-menu(:class="{'dropdown-menu-right': right}")
|
||||
@@ -12,27 +12,12 @@ A simplified dropdown component that doesn't rely on buttons as toggles like bo
|
||||
|
||||
<style lang="scss">
|
||||
@import '~client/assets/scss/colors.scss';
|
||||
.habitica-menu-dropdown {
|
||||
&:hover,
|
||||
&:focus { // NB focus styles match the hover styles for .svg-icon
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
|
||||
.habitica-menu-dropdown.open {
|
||||
.habitica-menu-dropdown-toggle .svg-icon {
|
||||
color: $white !important;
|
||||
}
|
||||
}
|
||||
|
||||
// Firefox outline fix for dropdown menu
|
||||
@supports (-moz-appearance:meterbar) and (all:initial) {
|
||||
.habitica-menu-dropdown.open {
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang='scss' scoped>
|
||||
@import '~client/assets/scss/colors.scss';
|
||||
@@ -81,9 +66,6 @@ export default {
|
||||
if (this.openStatus !== undefined) return this.openStatus === 1 ? true : false;
|
||||
return this.isDropdownOpen;
|
||||
},
|
||||
isPressed () {
|
||||
return this.isOpen ? 'true' : 'false';
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
document.documentElement.addEventListener('click', this._clickOutListener);
|
||||
|
||||
Reference in New Issue
Block a user