diff options
author | Carolyn MacLeod <Carolyn_MacLeod@ca.ibm.com> | 2016-11-30 16:23:29 +0000 |
---|---|---|
committer | Carolyn MacLeod <Carolyn_MacLeod@ca.ibm.com> | 2016-11-30 16:23:29 +0000 |
commit | 0ea742f9ca7b203ff3e0f596d191f5d31043d447 (patch) | |
tree | 5a83c20cdc7ff19346973e493dfc07d83390fa12 | |
parent | ca709ab0edf8258c3a6733ebf9158da6fd5f7a98 (diff) | |
download | org.eclipse.orion.client-0ea742f9ca7b203ff3e0f596d191f5d31043d447.zip org.eclipse.orion.client-0ea742f9ca7b203ff3e0f596d191f5d31043d447.tar.gz org.eclipse.orion.client-0ea742f9ca7b203ff3e0f596d191f5d31043d447.tar.bz2 |
Defect 64319 - Settings page: type down arrow in categories list moves down 3 times
-rw-r--r-- | bundles/org.eclipse.orion.client.ui/web/orion/widgets/settings/SplitSelectionLayout.js | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/settings/SplitSelectionLayout.js b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/settings/SplitSelectionLayout.js index baae802..542bff1 100644 --- a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/settings/SplitSelectionLayout.js +++ b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/settings/SplitSelectionLayout.js @@ -115,24 +115,26 @@ define(['orion/webui/littlelib', 'orion/objects'], function(lib, objects) { drawUserInterface: function() {
- lib.empty(this.navbar);
-
- var that = this, click;
- this.navbar.addEventListener('keydown', function(evt) { //$NON-NLS-0$
- if (evt.keyCode === lib.KEY.LEFT || evt.keyCode === lib.KEY.UP) {
- if (that.selectedCategory.previousSibling) {
- click = document.createEvent("MouseEvents"); //$NON-NLS-0$
- click.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); //$NON-NLS-0$
- that.selectedCategory.previousSibling.dispatchEvent(click);
- }
- } else if (evt.keyCode === lib.KEY.RIGHT || evt.keyCode === lib.KEY.DOWN) {
- if (that.selectedCategory.nextSibling) {
- click = document.createEvent("MouseEvents"); //$NON-NLS-0$
- click.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); //$NON-NLS-0$
- that.selectedCategory.nextSibling.dispatchEvent(click);
+ if (this.navbar.hasChildNodes()) {
+ lib.empty(this.navbar);
+ } else {
+ var that = this, click;
+ this.navbar.addEventListener('keydown', function(evt) { //$NON-NLS-0$
+ if (evt.keyCode === lib.KEY.LEFT || evt.keyCode === lib.KEY.UP) {
+ if (that.selectedCategory.previousSibling) {
+ click = document.createEvent("MouseEvents"); //$NON-NLS-0$
+ click.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); //$NON-NLS-0$
+ that.selectedCategory.previousSibling.dispatchEvent(click);
+ }
+ } else if (evt.keyCode === lib.KEY.RIGHT || evt.keyCode === lib.KEY.DOWN) {
+ if (that.selectedCategory.nextSibling) {
+ click = document.createEvent("MouseEvents"); //$NON-NLS-0$
+ click.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); //$NON-NLS-0$
+ that.selectedCategory.nextSibling.dispatchEvent(click);
+ }
}
- }
- });
+ });
+ }
}
});
return SplitSelectionLayout;
|