more focus checks
This commit is contained in:
parent
566672afe7
commit
f38dd63a68
@ -726,6 +726,7 @@
|
|||||||
},
|
},
|
||||||
keydown: function(e) {
|
keydown: function(e) {
|
||||||
var o, range, selEnd, selStart, ta, thread, valEnd, valMid, valStart, value, _ref, _ref2, _ref3;
|
var o, range, selEnd, selStart, ta, thread, valEnd, valMid, valStart, value, _ref, _ref2, _ref3;
|
||||||
|
updater.focus = true;
|
||||||
if (((_ref = e.target.nodeName) === 'TEXTAREA' || _ref === 'INPUT') && !e.altKey && !e.ctrlKey && !(e.keyCode === 27)) {
|
if (((_ref = e.target.nodeName) === 'TEXTAREA' || _ref === 'INPUT') && !e.altKey && !e.ctrlKey && !(e.keyCode === 27)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1650,7 +1651,7 @@
|
|||||||
while ((reply = replies.pop()) && (reply.id > id)) {
|
while ((reply = replies.pop()) && (reply.id > id)) {
|
||||||
arr.push(reply.parentNode.parentNode.parentNode);
|
arr.push(reply.parentNode.parentNode.parentNode);
|
||||||
}
|
}
|
||||||
scroll = updater.focus && arr.length && (d.body.scrollHeight - d.body.clientHeight - window.scrollY < 20);
|
scroll = conf['Scrolling'] && updater.focus && arr.length && (d.body.scrollHeight - d.body.clientHeight - window.scrollY < 20);
|
||||||
updater.timer.textContent = '-' + conf['Interval'];
|
updater.timer.textContent = '-' + conf['Interval'];
|
||||||
if (conf['Verbose']) {
|
if (conf['Verbose']) {
|
||||||
updater.count.textContent = '+' + arr.length;
|
updater.count.textContent = '+' + arr.length;
|
||||||
@ -2324,6 +2325,7 @@
|
|||||||
},
|
},
|
||||||
scroll: function(e) {
|
scroll: function(e) {
|
||||||
var bottom, height, i, reply, _len, _ref;
|
var bottom, height, i, reply, _len, _ref;
|
||||||
|
updater.focus = true;
|
||||||
height = d.body.clientHeight;
|
height = d.body.clientHeight;
|
||||||
_ref = unread.replies;
|
_ref = unread.replies;
|
||||||
for (i = 0, _len = _ref.length; i < _len; i++) {
|
for (i = 0, _len = _ref.length; i < _len; i++) {
|
||||||
|
|||||||
@ -518,6 +518,7 @@ keybinds =
|
|||||||
$.bind d, 'keydown', keybinds.keydown
|
$.bind d, 'keydown', keybinds.keydown
|
||||||
|
|
||||||
keydown: (e) ->
|
keydown: (e) ->
|
||||||
|
updater.focus = true
|
||||||
return if e.target.nodeName in ['TEXTAREA', 'INPUT'] and not e.altKey and not e.ctrlKey and not (e.keyCode is 27)
|
return if e.target.nodeName in ['TEXTAREA', 'INPUT'] and not e.altKey and not e.ctrlKey and not (e.keyCode is 27)
|
||||||
return unless key = keybinds.keyCode e
|
return unless key = keybinds.keyCode e
|
||||||
|
|
||||||
@ -1332,7 +1333,7 @@ updater =
|
|||||||
while (reply = replies.pop()) and (reply.id > id)
|
while (reply = replies.pop()) and (reply.id > id)
|
||||||
arr.push reply.parentNode.parentNode.parentNode #table
|
arr.push reply.parentNode.parentNode.parentNode #table
|
||||||
|
|
||||||
scroll = updater.focus && arr.length && (d.body.scrollHeight - d.body.clientHeight - window.scrollY < 20)
|
scroll = conf['Scrolling'] && updater.focus && arr.length && (d.body.scrollHeight - d.body.clientHeight - window.scrollY < 20)
|
||||||
|
|
||||||
updater.timer.textContent = '-' + conf['Interval']
|
updater.timer.textContent = '-' + conf['Interval']
|
||||||
if conf['Verbose']
|
if conf['Verbose']
|
||||||
@ -1770,6 +1771,7 @@ unread =
|
|||||||
Favicon.update()
|
Favicon.update()
|
||||||
|
|
||||||
scroll: (e) ->
|
scroll: (e) ->
|
||||||
|
updater.focus = true
|
||||||
height = d.body.clientHeight
|
height = d.body.clientHeight
|
||||||
for reply, i in unread.replies
|
for reply, i in unread.replies
|
||||||
{bottom} = reply.getBoundingClientRect()
|
{bottom} = reply.getBoundingClientRect()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user