Wrapped shortcut keys in condition so they only work when user is not typing inside of input field

This commit is contained in:
Saqib Razzaq 2016-05-16 18:30:34 +05:00
parent 10ce4b7929
commit b1b08a4368

View file

@ -20,6 +20,9 @@ function headerFooter(){
function shortKeys() {
$(document).keypress(function (e) {
var key = e.which;
if ($('#query,textarea,#name,#email').is(":focus")) {
// typing in field so shutup
} else {
if (pageNow == 'index') {
if(e.which == 70 && e.shiftKey) // shift + f = featured load more
{
@ -56,6 +59,7 @@ function shortKeys() {
{
window.location.href = baseurl+"/channels";
}
}
});
}