File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -307,10 +307,12 @@ export class TextAreaHandler extends ViewPart {
307307 } ) ) ;
308308
309309 this . _register ( this . _textAreaInput . onFocus ( ( ) => {
310+ this . _context . model . setHasFocus ( true ) ;
310311 this . _context . privateViewEventBus . emit ( new viewEvents . ViewFocusChangedEvent ( true ) ) ;
311312 } ) ) ;
312313
313314 this . _register ( this . _textAreaInput . onBlur ( ( ) => {
315+ this . _context . model . setHasFocus ( false ) ;
314316 this . _context . privateViewEventBus . emit ( new viewEvents . ViewFocusChangedEvent ( false ) ) ;
315317 } ) ) ;
316318 }
Original file line number Diff line number Diff line change @@ -316,7 +316,6 @@ export class View extends ViewEventHandler {
316316 }
317317 public onFocusChanged ( e : viewEvents . ViewFocusChangedEvent ) : boolean {
318318 this . domNode . setClassName ( this . getEditorClassName ( ) ) ;
319- this . _context . model . setHasFocus ( e . isFocused ) ;
320319 if ( e . isFocused ) {
321320 this . outgoingEvents . emitViewFocusGained ( ) ;
322321 } else {
Original file line number Diff line number Diff line change @@ -1595,9 +1595,6 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE
15951595 }
15961596
15971597 const onDidChangeTextFocus = ( textFocus : boolean ) => {
1598- if ( this . _modelData ) {
1599- this . _modelData . viewModel . cursor . setHasFocus ( textFocus ) ;
1600- }
16011598 this . _editorTextFocus . setValue ( textFocus ) ;
16021599 } ;
16031600
Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ export class ViewModel extends viewEvents.ViewEventEmitter implements IViewModel
160160
161161 public setHasFocus ( hasFocus : boolean ) : void {
162162 this . hasFocus = hasFocus ;
163+ this . cursor . setHasFocus ( hasFocus ) ;
163164 }
164165
165166 private _onConfigurationChanged ( eventsCollector : viewEvents . ViewEventsCollector , e : ConfigurationChangedEvent ) : void {
You can’t perform that action at this time.
0 commit comments