File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/vs/base/parts/quickinput/browser Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1230,10 +1230,10 @@ export class QuickInputController extends Disposable {
1230
1230
this . previousFocusElement = e . relatedTarget instanceof HTMLElement ? e . relatedTarget : undefined ;
1231
1231
} , true ) ) ;
1232
1232
this . _register ( focusTracker . onDidBlur ( ( ) => {
1233
- this . previousFocusElement = undefined ;
1234
1233
if ( ! this . getUI ( ) . ignoreFocusOut && ! this . options . ignoreFocusOut ( ) ) {
1235
- this . hide ( true ) ;
1234
+ this . hide ( ) ;
1236
1235
}
1236
+ this . previousFocusElement = undefined ;
1237
1237
} ) ) ;
1238
1238
this . _register ( dom . addDisposableListener ( container , dom . EventType . FOCUS , ( e : FocusEvent ) => {
1239
1239
inputBox . setFocus ( ) ;
@@ -1574,13 +1574,14 @@ export class QuickInputController extends Disposable {
1574
1574
}
1575
1575
}
1576
1576
1577
- hide ( focusLost ?: boolean ) {
1577
+ hide ( ) {
1578
1578
const controller = this . controller ;
1579
1579
if ( controller ) {
1580
+ const focusChanged = ! this . ui ?. container . contains ( document . activeElement ) ;
1580
1581
this . controller = null ;
1581
1582
this . onHideEmitter . fire ( ) ;
1582
1583
this . getUI ( ) . container . style . display = 'none' ;
1583
- if ( ! focusLost ) {
1584
+ if ( ! focusChanged ) {
1584
1585
if ( this . previousFocusElement && this . previousFocusElement . offsetParent ) {
1585
1586
this . previousFocusElement . focus ( ) ;
1586
1587
this . previousFocusElement = undefined ;
You can’t perform that action at this time.
0 commit comments