Focus returns to Shortcut Help button after Glossary window closes. when the Glossary OPENS, focus moves to the titleBarOverlay as with all other module windows.

This commit is contained in:
jtrobinson 2013-05-16 09:19:52 -07:00
parent 8c4d4b321e
commit e30cd65994
4 changed files with 27 additions and 1 deletions

View File

@ -71,6 +71,8 @@ package org.bigbluebutton.main.events {
public static const CHANGE_FONT_COLOUR:String = 'CHANGE_FONT_COLOUR';
public static const SEND_MESSAGE:String = 'SEND_MESSAGE';
public static const FOCUS_SHORTCUT_BUTTON:String = 'FOCUS_SHORTCUT_BUTTON';
// Temporary string to help fix chat message navigation for screen readers
public static const CHAT_DEBUG:String = 'CHAT_DEBUG';

View File

@ -222,7 +222,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
mdiCanvas.windowManager.add(scWindow);
mdiCanvas.windowManager.absPos(scWindow, mdiCanvas.width/2 - 150, mdiCanvas.height/2 - 150);
scWindow.focusCategories();
scWindow.focusHead();
}
private function toggleFullScreen():void{

View File

@ -33,6 +33,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<mate:Listener type="{SettingsEvent.SETTINGS_MODULE_LOADED}" method="showSettingsButton" />
<mate:Listener type="{ShortcutEvent.REMOTE_OPEN_SHORTCUT_WIN}" method="remoteShortcutClick" />
<mate:Listener type="{ShortcutEvent.LOGOUT}" method="remoteLogout" />
<mate:Listener type="{ShortcutEvent.FOCUS_SHORTCUT_BUTTON}" method="focusShortcutButton" />
<mx:Script>
@ -227,6 +228,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
var d:Dispatcher = new Dispatcher();
d.dispatchEvent(new ShortcutEvent(ShortcutEvent.OPEN_SHORTCUT_WIN));
}
private function focusShortcutButton(e:ShortcutEvent):void{
shortcutKeysBtn.setFocus();
}
]]>
</mx:Script>

View File

@ -28,10 +28,13 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
title="{ResourceUtil.getInstance().getString('bbb.shortcuthelp.title')}" >
<mate:Listener type="{LocaleChangeEvent.LOCALE_CHANGED}" method="localeChanged" />
<mate:Listener type="{MDIWindowEvent.CLOSE}" method="focusButton" />
<mx:Script>
<![CDATA[
import flash.events.Event;
import com.asfusion.mate.events.Dispatcher;
import flexlib.mdi.events.MDIWindowEvent;
import mx.collections.ArrayCollection;
import mx.collections.ArrayList;
@ -94,6 +97,12 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
changeArray();
}
public override function close(event:MouseEvent = null):void{
var dispatcher:Dispatcher = new Dispatcher();
dispatcher.dispatchEvent(new ShortcutEvent(ShortcutEvent.FOCUS_SHORTCUT_BUTTON));
super.close(event);
}
private function changeArray():void {
shownKeys = new ArrayCollection();
switch(categories.selectedIndex) {
@ -179,6 +188,16 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
focusManager.setFocus(keyList);
keyList.drawFocus(true);
}
public function focusHead():void {
focusManager.setFocus(titleBarOverlay);
}
public function focusButton(e:MDIWindowEvent):void{
LogUtil.debug("Caught close event from window");
var dispatcher:Dispatcher = new Dispatcher();
dispatcher.dispatchEvent(new ShortcutEvent(ShortcutEvent.FOCUS_SHORTCUT_BUTTON));
}
]]>
</mx:Script>