From 428b547d2450b9e7fbbf50a36f8fe06a75a0625e Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 26 Mar 2015 16:44:22 +0000 Subject: alt c to focus on chat and gritter and chat both now work with aria --- src/static/js/ace2_inner.js | 7 +++++++ src/static/js/chat.js | 4 ++++ src/static/js/gritter.js | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) (limited to 'src/static') diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index e190bfd7..cb09432b 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -3718,6 +3718,13 @@ function Ace2Inner(){ firstEditbarElement.focus(); evt.preventDefault(); } + if ((!specialHandled) && isTypeForSpecialKey && keyCode == 67){ + // Alt c focuses on the Chat window + parent.parent.chat.show(); + parent.parent.chat.focus(); + $(this).blur(); + evt.preventDefault(); + } if ((!specialHandled) && isTypeForSpecialKey && keyCode == 8) { // "delete" key; in mozilla, if we're at the beginning of a line, normalize now, diff --git a/src/static/js/chat.js b/src/static/js/chat.js index 811b1320..021a906a 100644 --- a/src/static/js/chat.js +++ b/src/static/js/chat.js @@ -36,6 +36,10 @@ var chat = (function() chatMentions = 0; Tinycon.setBubble(0); }, + focus: function () + { + $("#chatinput").focus(); + }, stickToScreen: function(fromInitialCall) // Make chat stick to right hand side of screen { chat.show(); diff --git a/src/static/js/gritter.js b/src/static/js/gritter.js index 9778707e..7f8c5b6e 100644 --- a/src/static/js/gritter.js +++ b/src/static/js/gritter.js @@ -78,7 +78,7 @@ _tpl_close: '
', _tpl_title: '[[title]]', _tpl_item: '', - _tpl_wrap: '
', + _tpl_wrap: '
', /** * Add a gritter notification to the screen -- cgit v1.2.3