Bug 801035 - Keyboard access for Social API chat windows. r=felipe

This commit is contained in:
Jared Wein 2012-10-23 23:45:59 -07:00
parent 7337c49e05
commit cc598aac90
3 changed files with 8 additions and 0 deletions

View File

@ -407,7 +407,9 @@
# overridden for other purposes there.
<key id="viewBookmarksSidebarWinKb" key="&bookmarksWinCmd.commandkey;" command="viewBookmarksSidebar" modifiers="accel"/>
#endif
<key id="sharePage" key="&sharePageCmd.commandkey;" command="Social:SharePage" modifiers="accel,shift"/>
<key id="focusChatBar" key="&social.chatBar.commandkey;" oncommand="SocialChatBar.focus();" modifiers="accel,shift"/>
# don't use |command="Browser:Stop"|, ESC is being used to freeze animated gifs,
# even if the stop button and menuitem are disabled (see Bug 284140)

View File

@ -210,6 +210,10 @@ let SocialChatBar = {
update: function() {
if (!this.canShow)
this.chatbar.removeAll();
},
focus: function SocialChatBar_focus() {
let commandDispatcher = gBrowser.ownerDocument.commandDispatcher;
commandDispatcher.advanceFocusIntoSubtree(this.chatbar);
}
}

View File

@ -659,3 +659,5 @@ toolbar button -->
<!ENTITY social.activated.undobutton.label "Undo">
<!ENTITY social.activated.undobutton.accesskey "U">
<!ENTITY social.chatBar.commandkey "c">