Remove accesskeys, we can't prevent them otherwise.

This commit is contained in:
Nicolas Stepien 2011-06-24 20:26:22 +02:00
parent 1a0e537d79
commit beede2108c
2 changed files with 9 additions and 3 deletions

View File

@ -692,7 +692,12 @@
};
keybinds = {
init: function() {
var key;
var key, node, _i, _len, _ref;
_ref = $$('[accesskey]');
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
node = _ref[_i];
node.removeAttribute('accesskey');
}
keybinds.close = (key = $.getValue('key/close', 0)).length ? key : 'Esc';
keybinds.spoiler = (key = $.getValue('key/spoiler', 0)).length ? key : 'ctrl+s';
keybinds.zero = (key = $.getValue('key/zero', 0)).length ? key : '0';
@ -1087,7 +1092,6 @@
keybind: function(e) {
var kc, key;
e.preventDefault();
e.stopPropagation();
kc = e.keyCode;
if ((65 <= kc && kc <= 90)) {
key = String.fromCharCode(kc);

View File

@ -489,6 +489,9 @@ replyHiding =
keybinds =
init: ->
for node in $$ '[accesskey]'
node.removeAttribute 'accesskey'
keybinds.close = if (key = $.getValue 'key/close', 0).length then key else 'Esc'
keybinds.spoiler = if (key = $.getValue 'key/spoiler', 0).length then key else 'ctrl+s'
keybinds.zero = if (key = $.getValue 'key/zero', 0).length then key else '0'
@ -866,7 +869,6 @@ options =
g.hiddenReplies = {}
keybind: (e) ->
e.preventDefault()
e.stopPropagation()
kc = e.keyCode
if 65 <= kc <= 90 #A-Z
key = String.fromCharCode kc