no shortcuts if we're typing in an input, or logged out

This commit is contained in:
Hannes Mannerheim 2015-07-02 00:08:54 +02:00
parent 8559bac6e2
commit 18536da247

View File

@ -2473,10 +2473,12 @@ $('body').on('keydown','.queet-box-syntax',function (e) {
$('body').keyup(function (e) {
// only if queetbox is blurred
if($('.queet-box-syntax[contenteditable="true"]').length == 0) {
// only if queetbox is blurred, and we're not typing in any input, and we're logged in
if($('.queet-box-syntax[contenteditable="true"]').length == 0
&& $(":focus").length == 0
&& window.loggedIn !== false) {
// shortcuts menu on ?
// shortcuts documentation on '?'
if(e.shiftKey && e.which == 171) {
$('#shortcuts-link').click();
}