Make sure a window isn't selected when C or P is pressed
This commit is contained in:
parent
b2432607fc
commit
03d4fd9a95
4
popup.js
4
popup.js
|
@ -429,6 +429,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||
}
|
||||
//Close when c is pressed
|
||||
else if (event.keyCode===67){
|
||||
if (tabKeyIndex>0){
|
||||
tabList[tabKeyIndex].querySelector('i.close').click();
|
||||
//Move the selection after pressing c.
|
||||
//Check to make sure we're not leaving the bounds of the list
|
||||
|
@ -452,10 +453,13 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||
}
|
||||
tabList[tabKeyIndex].classList.add('keyHover');
|
||||
}
|
||||
}
|
||||
//Pin when p is pressed
|
||||
else if(event.keyCode===80){
|
||||
if (tabKeyIndex>0){
|
||||
tabList[tabKeyIndex].querySelector('i.pin').click();
|
||||
}
|
||||
}
|
||||
//Go to search box when s is pressed.
|
||||
else if (event.keyCode===83){
|
||||
event.preventDefault();
|
||||
|
|
Loading…
Reference in a new issue