Skip to content

Commit

Permalink
Fix #47157 - "Toggle query details" should focus include/exclude box
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed Apr 25, 2018
1 parent 1139de1 commit 2272f36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/vs/workbench/parts/search/browser/searchView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,13 @@ export class SearchView extends Viewlet implements IViewlet, IPanel {
builder.div({ 'class': 'more', 'tabindex': 0, 'role': 'button', 'title': nls.localize('moreSearch', "Toggle Search Details") })
.on(dom.EventType.CLICK, (e) => {
dom.EventHelper.stop(e);
this.toggleQueryDetails(true);
this.toggleQueryDetails();
}).on(dom.EventType.KEY_UP, (e: KeyboardEvent) => {
let event = new StandardKeyboardEvent(e);

if (event.equals(KeyCode.Enter) || event.equals(KeyCode.Space)) {
dom.EventHelper.stop(e);
this.toggleQueryDetails();
this.toggleQueryDetails(false);
}
});

Expand Down Expand Up @@ -943,7 +943,7 @@ export class SearchView extends Viewlet implements IViewlet, IPanel {
this.onQueryChanged(true, true);
}

public toggleQueryDetails(moveFocus?: boolean, show?: boolean, skipLayout?: boolean, reverse?: boolean): void {
public toggleQueryDetails(moveFocus = true, show?: boolean, skipLayout?: boolean, reverse?: boolean): void {
let cls = 'more';
show = typeof show === 'undefined' ? !dom.hasClass(this.queryDetails, cls) : Boolean(show);
this.viewletSettings['query.queryDetailsExpanded'] = show;
Expand Down

0 comments on commit 2272f36

Please sign in to comment.