Fix key handling after simulator is made full screen #10365
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.
After triggering the full screen simulator, the "escape" key does nothing. After minimising the simulator using the relevant button, the "escape" key now triggers the full screen simulator.
The logic in the code appears to be inverted. The call to focus the simulator also seems dubious as it feels like the best thing to do is leave focus on the fullscreen toggle button in both the expand and collapse case, however, I'd welcome feedback on this.
This PR fixes the inverted logic in the code
and removes the dubious focus call.