Add workaround for hovering above/below the close/pin buttons
This commit is contained in:
parent
d96aa9871a
commit
4da0721020
|
@ -62,7 +62,7 @@ i.close{
|
|||
font-size: 14px;
|
||||
color:#000;
|
||||
}
|
||||
i.close:hover{
|
||||
i.close:hover,i.close.fakeHover{
|
||||
color:#E53935
|
||||
}
|
||||
i.pin{
|
||||
|
@ -75,10 +75,10 @@ i.pin{
|
|||
i.pin.pinned{
|
||||
color:#1565C0;
|
||||
}
|
||||
i.pin:hover{
|
||||
i.pin:hover,i.pin.fakeHover{
|
||||
color:#1565C0;
|
||||
}
|
||||
i.pin.pinned:hover{
|
||||
i.pin.pinned:hover,i.pin.pinned.fakeHover{
|
||||
color:#000;
|
||||
}
|
||||
input#search{
|
||||
|
|
24
popup.js
24
popup.js
|
@ -180,7 +180,31 @@ function setupTabs(tabs,callback){
|
|||
chrome.tabs.update(currentTab.id,{'highlighted':true,'active':true});
|
||||
});
|
||||
});
|
||||
|
||||
var mouseListenerFunction = function(event){
|
||||
if (event.clientX>=closeButton.getBoundingClientRect().left && event.clientX<=closeButton.getBoundingClientRect().right){
|
||||
console.log("Adding!");
|
||||
closeButton.classList.add('fakeHover');
|
||||
console.log(closeButton.classList);
|
||||
}
|
||||
else{
|
||||
closeButton.classList.remove('fakeHover');
|
||||
}
|
||||
if (event.clientX>=pinButton.getBoundingClientRect().left && event.clientX<=pinButton.getBoundingClientRect().right){
|
||||
pinButton.classList.add('fakeHover');
|
||||
}
|
||||
else{
|
||||
pinButton.classList.remove('fakeHover');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
li.addEventListener('mousein', mouseListenerFunction);
|
||||
li.addEventListener('mousemove', mouseListenerFunction);
|
||||
li.addEventListener('mouseout', function(event){
|
||||
closeButton.classList.remove('fakeHover');
|
||||
pinButton.classList.remove('fakeHover');
|
||||
});
|
||||
li.appendChild(textSpan);
|
||||
textSpan.appendChild(pinButton);
|
||||
textSpan.appendChild(closeButton);
|
||||
|
|
Loading…
Reference in a new issue