[MGNLUI-3452] Using keyboard to switch and select tab Created: 04/Jun/15 Updated: 14/Jul/15 Resolved: 29/Jun/15 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | user interaction |
| Affects Version/s: | 5.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Sang Ngo Huu | Assignee: | Sang Ngo Huu |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 4d 5h | ||
| Original Estimate: | 5h | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Description |
|
To switch between tabs using the keyboard, you use the arrow keys to change the focus to a different tab, then switch to it by e.g. pressing SPACE. |
| Comments |
| Comment by Sang Ngo Huu [ 29/Jun/15 ] |
|
Arrow keys is used for moving text pointer by default. BTW when a tab is selected, the first field in tab content will be focused, we must move the focus back to tab. If still want to have shortcut, code should be added to:
UI ui = UI.getCurrent();
if (ui != null) {
WebBrowser browser = ui.getPage().getWebBrowser();
int[] osSpecificModifierKeys;
if (browser.isWindows()) {
osSpecificModifierKeys = new int[] { ModifierKey.CTRL, ModifierKey.ALT };
} else {
// osx and linux
osSpecificModifierKeys = new int[] { ModifierKey.META, ModifierKey.ALT };
}
addShortcutListener(new ShortcutListener("", KeyCode.ARROW_RIGHT, osSpecificModifierKeys) {
@Override
public void handleAction(Object sender, Object target) {
tabSheet.setActiveTab(tabSheet.getNextTab(tabSheet.getActiveTab()));
}
});
addShortcutListener(new ShortcutListener("", KeyCode.ARROW_RIGHT, osSpecificModifierKeys) {
@Override
public void handleAction(Object sender, Object target) {
tabSheet.setActiveTab(tabSheet.getPreviousTab(tabSheet.getActiveTab()));
}
});
}
Closed issue and mark it won't fix. |