Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
  • Loading branch information
marcoambrosini committed Apr 16, 2021
1 parent 300efa4 commit 83a86bb
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/components/ListItem/ListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -311,16 +311,21 @@ export default {
this.displayActions = false
},
/**
* Show actions upon focus
*/
handleFocus() {
this.focused = true
this.showActions()
},
handleBlur(e) {
console.debug(e)
handleBlur() {
this.focused = false
},
/**
* Hide the actions on mouseleave unless the menu is open
*/
handleMouseleave() {
if (!this.menuOpen) {
this.displayActions = false
Expand All @@ -331,7 +336,7 @@ export default {
/**
* This method checks if the root element of the component is focused and
* if that's the case it focuses the actions button if available
* @param {object} e the keydown event
* @param {Event} e the keydown event
*/
handleTab(e) {
if (this.focused && this.hasActions) {
Expand All @@ -356,11 +361,6 @@ export default {
.list-item__wrapper{
position: relative;
width: 100%;
.actions {
position: absolute;
top: 4px;
right: 12px;
}
}
// listItem
Expand Down Expand Up @@ -443,7 +443,7 @@ export default {
font-weight: bold;
}
&__subtitle {
&__subtitle {
overflow: hidden;
flex-grow: 1;
padding-right: 4px;
Expand Down

0 comments on commit 83a86bb

Please sign in to comment.