fix reply mode switching

This commit is contained in:
James Campos 2010-11-18 20:58:00 -08:00
parent 0df39c402a
commit 0b32a3b65d
2 changed files with 14 additions and 14 deletions

View File

@ -552,6 +552,11 @@ quickReply = (e) ->
m clone,
listener: ['submit', formSubmit]
target: 'iframe'
if getConfig 'Keyboard Actions'
inputs = $$ 'input[type=text], textarea', clone
for input in inputs
input.addEventListener 'focus', keyActRem, true
input.addEventListener 'blur', keyActAdd, true
if not g.REPLY
#figure out which thread we're replying to
xpath = 'preceding::span[@class="postername"][1]/preceding::input[1]'
@ -560,11 +565,6 @@ quickReply = (e) ->
name: 'resto'
value: x(xpath, this).name
addTo clone, input
if getConfig 'Keyboard Actions'
inputs = $$ 'input[type=text], textarea', clone
for input in inputs
input.addEventListener 'focus', keyActRem, true
input.addEventListener 'blur', keyActAdd, true
else if getConfig 'Persistent QR'
submit = $ 'input[type=submit]', clone
auto = n 'label',

View File

@ -714,6 +714,15 @@
listener: ['submit', formSubmit],
target: 'iframe'
});
if (getConfig('Keyboard Actions')) {
inputs = $$('input[type=text], textarea', clone);
_ref = inputs;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
input = _ref[_i];
input.addEventListener('focus', keyActRem, true);
input.addEventListener('blur', keyActAdd, true);
}
}
if (!g.REPLY) {
xpath = 'preceding::span[@class="postername"][1]/preceding::input[1]';
input = n('input', {
@ -722,15 +731,6 @@
value: x(xpath, this).name
});
addTo(clone, input);
if (getConfig('Keyboard Actions')) {
inputs = $$('input[type=text], textarea', clone);
_ref = inputs;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
input = _ref[_i];
input.addEventListener('focus', keyActRem, true);
input.addEventListener('blur', keyActAdd, true);
}
}
} else if (getConfig('Persistent QR')) {
submit = $('input[type=submit]', clone);
auto = n('label', {