diff --git a/CHANGELOG.md b/CHANGELOG.md index 32e5cd4..07a51b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Fixes [#1882](https://github.com/gitkraken/vscode-gitlens/issues/1882) - Blame annotations not showing anymore after update - Fixes [#1787](https://github.com/gitkraken/vscode-gitlens/issues/1787) - Remove '-review' from Gerrit Remote reviewDomain() — thanks to [PR #1954](https://github.com/gitkraken/vscode-gitlens/pull/1954) by Felipe Santos ([@felipecrs](https://github.com/felipecrs)) - Fixes [#1902](https://github.com/gitkraken/vscode-gitlens/issues/1902) - Support replacing mirror/replica domain with main domain for remote provider — thanks to [PR #1954](https://github.com/gitkraken/vscode-gitlens/pull/1954) by Felipe Santos ([@felipecrs](https://github.com/felipecrs)) +- Fixes an issue where clicking on tokens on the Settings editor popup wouldn't add the token into the input ## [12.0.6] - 2022-04-12 diff --git a/src/webviews/apps/shared/appWithConfigBase.ts b/src/webviews/apps/shared/appWithConfigBase.ts index 9818d5e..d73aec0 100644 --- a/src/webviews/apps/shared/appWithConfigBase.ts +++ b/src/webviews/apps/shared/appWithConfigBase.ts @@ -58,7 +58,7 @@ export abstract class AppWithConfig extends Ap (e, target: HTMLInputElement) => this.onInputChanged(target), ), DOM.on('select[data-setting]', 'change', (e, target: HTMLSelectElement) => this.onInputSelected(target)), - DOM.on('.popup', 'mousedown', (e, target: HTMLElement) => this.onPopupMouseDown(target, e)), + DOM.on('.token[data-token]', 'mousedown', (e, target: HTMLElement) => this.onTokenMouseDown(target, e)), ); return disposables; @@ -222,15 +222,6 @@ export abstract class AppWithConfig extends Ap this.applyChanges(); } - protected onPopupMouseDown(element: HTMLElement, e: MouseEvent) { - e.preventDefault(); - - const el = e.target as HTMLElement; - if (el?.matches('[data-token]')) { - this.onTokenMouseDown(el, e); - } - } - protected onTokenMouseDown(element: HTMLElement, e: MouseEvent) { if (this._updating) return;