-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve widget focus handling #7707
improve widget focus handling #7707
Conversation
6bb2a12
to
3f0452e
Compare
3f0452e
to
c78d1ec
Compare
…used editor Signed-off-by: Anton Kosyakov <[email protected]>
…ets closed support next/previous tab group commands support next/previous tab in group commands Signed-off-by: Anton Kosyakov <[email protected]>
c78d1ec
to
bb7462d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I verified the changes and noticed that #7170 does not work properly?
I opened a 'preview editor' and the focus still remains in the explorer when I start typing to update the document. If I do a search however (ctrlcmd+f) I see that focus is transferred to the document successfully. Is this intended?
It is correct behaviour of preview, focus should still belong to the navigator. But now you should see that the status bar reflects the state of a previewed document and you can debug it from the debug view without focusing. |
newValue['onCloseRequest'] = onCloseRequest; | ||
newValue['onCloseRequest'](msg); | ||
}; | ||
this.toDisposeOnActiveChanged.push(Disposable.create(() => newValue['onCloseRequest'] = onCloseRequest)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case we fork or reimplement PhosphorJS, we should add direct support for this so we don't have to fiddle with the onCloseRequest
method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah something like onWillClose
event for all widgets will be better.
@vince-fugnitto Could you check too? I will wait to merge till tomorrow evening. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes work well for me! 👍
I verified the following:
- the new commands work successfully
- closing an editor switches focus to an opened editor (based on group)
- preview editors now show statusbar info (language, encoding, etc.)
- preview editors can now be debugged (ran a mocha test as a preview)
Yes! I was just updating the review :) |
What it does
How to test
Review checklist
Reminder for reviewers