1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-02-18 03:37:35 +01:00

Add 'esc' keybind to close quick-reply.

This commit is contained in:
marktaiwan 2015-01-25 17:55:26 +08:00
parent 6b7df139e6
commit f548a03e69

View File

@ -278,7 +278,13 @@
}
});
$postForm.find('textarea[name="body"]').removeAttr('id').removeAttr('cols').attr('placeholder', _('Comment'));
$postForm.find('textarea[name="body"]').removeAttr('id').removeAttr('cols').attr('placeholder', _('Comment'))
.on('keydown', function (e) {
//close quick reply when esc is prssed
if (e.which === 27) {
$('.close-btn').trigger('click');
}
});
$postForm.find('textarea:not([name="body"]),input[type="hidden"]:not(.captcha_cookie)').removeAttr('id').appendTo($dummyStuff);