Skip to content
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

Fix crash when user taps tab key on external keyboard #2205

Merged
merged 3 commits into from
Jan 18, 2022

Conversation

mats-claassen
Copy link
Member

Fixes #2181

var didHandleEvent = false
for press in presses {
guard let key = press.key else { continue }
if key.keyCode == .keyboardTab,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could add to existing or create another guard clause to avoid nesting.

Suggested change
if key.keyCode == .keyboardTab,
guard key.keyCode == .keyboardTab, key.modifiedFlags.contains(.command) else { continue }
// Remaining code

@@ -11,9 +11,12 @@ jobs:
runs-on: macOS-latest
strategy:
matrix:
destination: ['platform=iOS Simulator,OS=14.4,name=iPhone 11']
destination: ['platform=iOS Simulator,OS=15.2,name=iPhone 11']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this updates your framework to be built against iOS 15.2 and Xcode version 13.2.1?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but just for the tests

@mats-claassen mats-claassen merged commit f3ef384 into master Jan 18, 2022
@mats-claassen mats-claassen deleted the fix/tab-key-pressed branch January 18, 2022 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash on ipadOS/iOS 15 when pressing Tab key using hardware keyboard
2 participants