Proposal - Dont focus flyout on close #2671
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
I have multiple windows, and i'm using flyouts to show an alert condition in the application. When the user dismisses the alert all flyouts are closed via my application code.
The problem
This line causes the last Window my where my code closes the flyout to receive focus , bringing that window to the front, interrupting the users activity:
Remarks
I understand there is a specific comment here regarding this line to perform some visual trickery. However, it's not logically correct. I have experimented, removed the line, and I can't see any display issues in my application.
Maybe someone / @punker76 , with some background on this line can comment?
Another option would be to make the code a bit more specific; only run the focus if the current Window is active, something like: