-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Manually close tabs when they're closed while dragging them #5883
Conversation
## Summary of the Pull Request When we're dragging the tab around, if you execute a `ClosePane`/`CloseTab`, then we should make sure to actually activate a new tab, so that focus doesn't just fall into the void. ## References * This is almost exactly #5799, but with rearranging tabs ## PR Checklist * [x] Closes #5559 * [x] I work here * [ ] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments We suppress `_OnTabItemsChanged` events during a rearrange, so if a tab is closed while we're rearranging tabs, the we don't fire the `SelectionChanged` event that we usually do during a close that would select the new tab. ## Validation Steps Performed * Tested manually - Confirmed that tragging a tab out, closing it, then dragging it back in does nothing.
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'm scared about how this actually works -- the currently dragging tab gets removed from the list, and everything is just.. okay?
Shockingly, yea. I bet the whole drag-drop is managed by something like |
Hello @DHowett-MSFT! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
…t#5883) ## Summary of the Pull Request When we're dragging the tab around, if you execute a `ClosePane`/`CloseTab`, then we should make sure to actually activate a new tab, so that focus doesn't just fall into the void. ## References * This is almost exactly microsoft#5799, but with rearranging tabs ## PR Checklist * [x] Closes microsoft#5559 * [x] I work here * [ ] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments We suppress `_OnTabItemsChanged` events during a rearrange, so if a tab is closed while we're rearranging tabs, the we don't fire the `SelectionChanged` event that we usually do during a close that would select the new tab. ## Validation Steps Performed * Tested manually - Confirmed that tragging a tab out, closing it, then dragging it back in does nothing.
🎉 Handy links: |
## Summary of the Pull Request When we're dragging the tab around, if you execute a `ClosePane`/`CloseTab`, then we should make sure to actually activate a new tab, so that focus doesn't just fall into the void. ## References * This is almost exactly #5799, but with rearranging tabs ## PR Checklist * [x] Closes #5559 * [x] I work here * [ ] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments We suppress `_OnTabItemsChanged` events during a rearrange, so if a tab is closed while we're rearranging tabs, the we don't fire the `SelectionChanged` event that we usually do during a close that would select the new tab. ## Validation Steps Performed * Tested manually - Confirmed that tragging a tab out, closing it, then dragging it back in does nothing. (cherry picked from commit 1422714)
## Summary of the Pull Request When we're dragging the tab around, if you execute a `ClosePane`/`CloseTab`, then we should make sure to actually activate a new tab, so that focus doesn't just fall into the void. ## References * This is almost exactly #5799, but with rearranging tabs ## PR Checklist * [x] Closes #5559 * [x] I work here * [ ] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments We suppress `_OnTabItemsChanged` events during a rearrange, so if a tab is closed while we're rearranging tabs, the we don't fire the `SelectionChanged` event that we usually do during a close that would select the new tab. ## Validation Steps Performed * Tested manually - Confirmed that tragging a tab out, closing it, then dragging it back in does nothing. (cherry picked from commit 1422714)
🎉 Handy links: |
Summary of the Pull Request
When we're dragging the tab around, if you execute a
ClosePane
/CloseTab
, then we should make sure to actually activate a new tab, so that focus doesn't just fall into the void.References
PR Checklist
Detailed Description of the Pull Request / Additional comments
We suppress
_OnTabItemsChanged
events during a rearrange, so if a tab is closed while we're rearranging tabs, the we don't fire theSelectionChanged
event that we usually do during a close that would select the new tab.Validation Steps Performed