Skip to content

Commit e3330be

Browse files
committed
Stops header collapse on learn more
1 parent 45fc80a commit e3330be

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

src/ui/settings/app.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ export class SettingsApp extends App {
1212
super.bind();
1313

1414
const onSectionHeaderClicked = this.onSectionHeaderClicked.bind(this);
15-
DOM.listenAll('.section__header', 'click', function(this: HTMLInputElement) { onSectionHeaderClicked(this); });
15+
DOM.listenAll('.section__header', 'click', function(this: HTMLInputElement) { return onSectionHeaderClicked(this, ...arguments); });
1616
}
1717

18-
private onSectionHeaderClicked(element: HTMLElement) {
18+
private onSectionHeaderClicked(element: HTMLElement, e: MouseEvent) {
19+
if ((e.target as HTMLElement).matches('i.icon__info') ||
20+
(e.target as HTMLElement).matches('a.link__learn-more')) return;
21+
1922
element.classList.toggle('collapsed');
2023
}
2124
}

src/ui/settings/index.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ <h2 class="page-header__title">Settings</h2>
4646
<section id="gitlens-explorer">
4747
<div class="section__header">
4848
<h2 class="section__title">GitLens Explorer
49-
<a title="Learn more" href="https://github.com/eamodio/vscode-gitlens/tree/develop#gitlens-explorer">
49+
<a class="link__learn-more" title="Learn more" href="https://github.com/eamodio/vscode-gitlens/tree/develop#gitlens-explorer">
5050
<i class="icon icon__info"></i>
5151
</a>
5252
</h2>
@@ -121,7 +121,7 @@ <h2 class="section__title">GitLens Explorer
121121
<section id="gitlens-results">
122122
<div class="section__header">
123123
<h2 class="section__title">GitLens Results
124-
<a title="Learn more" href="https://github.com/eamodio/vscode-gitlens/tree/develop#gitlens-results-view">
124+
<a class="link__learn-more" title="Learn more" href="https://github.com/eamodio/vscode-gitlens/tree/develop#gitlens-results-view">
125125
<i class="icon icon__info"></i>
126126
</a>
127127
</h2>
@@ -166,7 +166,7 @@ <h2 class="section__title">GitLens Results
166166
<section id="code-lens">
167167
<div class="section__header">
168168
<h2 class="section__title">Code Lens
169-
<a title="Learn more" href="https://github.com/eamodio/vscode-gitlens/tree/develop#code-lens">
169+
<a class="link__learn-more" title="Learn more" href="https://github.com/eamodio/vscode-gitlens/tree/develop#code-lens">
170170
<i class="icon icon__info"></i>
171171
</a>
172172
</h2>
@@ -257,7 +257,7 @@ <h2 class="section__title">Code Lens
257257
<section id="current-line">
258258
<div class="section__header">
259259
<h2 class="section__title">Current Line Blame
260-
<a title="Learn more" href="https://github.com/eamodio/vscode-gitlens/tree/develop#current-line-blame">
260+
<a class="link__learn-more" title="Learn more" href="https://github.com/eamodio/vscode-gitlens/tree/develop#current-line-blame">
261261
<i class="icon icon__info"></i>
262262
</a>
263263
</h2>
@@ -290,7 +290,7 @@ <h2 class="section__title">Current Line Blame
290290
<section id="blame">
291291
<div class="section__header">
292292
<h2 class="section__title">Gutter Blame
293-
<a title="Learn more" href="https://github.com/eamodio/vscode-gitlens/tree/develop#gutter-blame">
293+
<a class="link__learn-more" title="Learn more" href="https://github.com/eamodio/vscode-gitlens/tree/develop#gutter-blame">
294294
<i class="icon icon__info"></i>
295295
</a>
296296
</h2>
@@ -365,7 +365,7 @@ <h2 class="section__title">Gutter Blame
365365
<section id="hovers">
366366
<div class="section__header">
367367
<h2 class="section__title">Hovers
368-
<a title="Learn more" href="https://github.com/eamodio/vscode-gitlens/tree/develop#hovers">
368+
<a class="link__learn-more" title="Learn more" href="https://github.com/eamodio/vscode-gitlens/tree/develop#hovers">
369369
<i class="icon icon__info"></i>
370370
</a>
371371
</h2>
@@ -468,7 +468,7 @@ <h2 class="section__title">Hovers
468468
<section id="recent-changes">
469469
<div class="section__header">
470470
<h2 class="section__title">Recent Changes
471-
<a title="Learn more" href="https://github.com/eamodio/vscode-gitlens/tree/develop#recent-changes">
471+
<a class="link__learn-more" title="Learn more" href="https://github.com/eamodio/vscode-gitlens/tree/develop#recent-changes">
472472
<i class="icon icon__info"></i>
473473
</a>
474474
</h2>
@@ -509,7 +509,7 @@ <h2 class="section__title">Recent Changes
509509
<section id="status-bar">
510510
<div class="section__header">
511511
<h2 class="section__title">Status Bar Blame
512-
<a title="Learn more" href="https://github.com/eamodio/vscode-gitlens/tree/develop#status-bar-blame">
512+
<a class="link__learn-more" title="Learn more" href="https://github.com/eamodio/vscode-gitlens/tree/develop#status-bar-blame">
513513
<i class="icon icon__info"></i>
514514
</a>
515515
</h2>

src/ui/shared/app-base.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ export abstract class App {
6363

6464
protected bind() {
6565
const onInputChecked = this.onInputChecked.bind(this);
66-
DOM.listenAll('input[type="checkbox"].setting', 'change', function(this: HTMLInputElement) { onInputChecked(this); });
66+
DOM.listenAll('input[type="checkbox"].setting', 'change', function(this: HTMLInputElement) { return onInputChecked(this, ...arguments); });
6767

6868
const onInputSelected = this.onInputSelected.bind(this);
69-
DOM.listenAll('select.setting', 'change', function(this: HTMLInputElement) { onInputSelected(this); });
69+
DOM.listenAll('select.setting', 'change', function(this: HTMLInputElement) { return onInputSelected(this, ...arguments); });
7070
}
7171

7272
protected log(message: string) {

0 commit comments

Comments
 (0)