mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
Bug 1144377 - hover state on reading list sidebar items remains after the mouse leaves the list, r=jaws.
This commit is contained in:
parent
b80f92a0b2
commit
d13830aaa4
@ -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;
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user