File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/vs/workbench/contrib/interactiveEditor/browser Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,15 @@ export class InteractiveEditorDiffWidget extends ZoneWidget {
116
116
117
117
this . _sessionStore . add ( this . _diffEditor . onDidUpdateDiff ( ( ) => {
118
118
const result = this . _diffEditor . getDiffComputationResult ( ) ;
119
+ const hasFocus = this . _diffEditor . hasTextFocus ( ) ;
119
120
this . _doShowForChanges ( range ( ) , result ?. changes2 ?? [ ] ) ;
121
+ // TODO@jrieken find a better fix for this. this is the challenge:
122
+ // the _doShowForChanges method invokes show of the zone widget which removes and adds the
123
+ // zone and overlay parts. this dettaches and reattaches the dom nodes which means they lose
124
+ // focus
125
+ if ( hasFocus ) {
126
+ this . _diffEditor . focus ( ) ;
127
+ }
120
128
} ) ) ;
121
129
this . _doShowForChanges ( range ( ) , changes ) ;
122
130
}
You can’t perform that action at this time.
0 commit comments