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}
|
* @type {Element}
|
||||||
*/
|
*/
|
||||||
get activeItem() {
|
get activeItem() {
|
||||||
@ -204,7 +204,7 @@ let RLSidebar = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The currently selected item in the list.
|
* The list item selected with the keyboard.
|
||||||
* @type {Element}
|
* @type {Element}
|
||||||
*/
|
*/
|
||||||
get selectedItem() {
|
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.
|
* @param {Event} event - Triggering event.
|
||||||
*/
|
*/
|
||||||
onListMouseMove(event) {
|
onListMouseMove(event) {
|
||||||
let itemNode = this.findParentItemNode(event.target);
|
let itemNode = this.findParentItemNode(event.target);
|
||||||
if (!itemNode)
|
if (itemNode != this.selectedItem)
|
||||||
return;
|
this.selectedItem = null;
|
||||||
|
|
||||||
this.selectedItem = itemNode;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -84,11 +84,12 @@ body {
|
|||||||
color: #008ACB;
|
color: #008ACB;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item:not(:hover) .remove-button {
|
.item:not(:hover):not(.selected) .remove-button {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.remove-button {
|
.remove-button {
|
||||||
|
padding: 0;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
|
Loading…
Reference in New Issue
Block a user