Bug 1144377 - hover state on reading list sidebar items remains after the mouse leaves the list, r=jaws.

This commit is contained in:
Florian Quèze 2015-03-19 15:50:23 -07:00
parent b80f92a0b2
commit d13830aaa4
2 changed files with 8 additions and 8 deletions

View File

@ -165,7 +165,7 @@ let RLSidebar = {
},
/**
* The currently active element in the list.
* The list item displayed in the current tab.
* @type {Element}
*/
get activeItem() {
@ -204,7 +204,7 @@ let RLSidebar = {
},
/**
* The currently selected item in the list.
* The list item selected with the keyboard.
* @type {Element}
*/
get selectedItem() {
@ -366,15 +366,14 @@ let RLSidebar = {
},
/**
* Handle a mousemove event over the list box.
* Handle a mousemove event over the list box:
* If the hovered item isn't the selected one, clear the selection.
* @param {Event} event - Triggering event.
*/
onListMouseMove(event) {
let itemNode = this.findParentItemNode(event.target);
if (!itemNode)
return;
this.selectedItem = itemNode;
if (itemNode != this.selectedItem)
this.selectedItem = null;
},
/**

View File

@ -84,11 +84,12 @@ body {
color: #008ACB;
}
.item:not(:hover) .remove-button {
.item:not(:hover):not(.selected) .remove-button {
display: none;
}
.remove-button {
padding: 0;
width: 16px;
height: 16px;
background-size: contain;