Conversation
|
Actually this might be fixing my issue, but messing with latching. Checking. |
|
Hmm. The SwiftUI gesture is calling onEnded even when you tap outside of the key. Those touches also don't trigger the UITouch stuff. Removing that code entirely breaks latching. This may need a larger refactor. |
This reverts commit e17ccfd.
|
@aure Alright this should be ready for review again when you get a chance. Changes: I'm passing the latching state to use or bypass the onEnded method. It worked fine in iOS 17, but now TapGesture's onEnded is called when you tap outside of the view while UITouch methods are not called. |
There was a problem hiding this comment.
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (3)
Sources/Keyboard/KeyboardModel.swift:12
- If latching is intended to trigger UI updates, consider marking it with @published so that SwiftUI views correctly react to its changes.
var latching: Bool = false
Sources/Keyboard/Keyboard.swift:84
- [nitpick] Ensure that the variable 'latching' being assigned exists in the current scope and is clearly defined to avoid ambiguity.
model.latching = latching
Sources/Keyboard/KeyContainer.swift:38
- [nitpick] Consider adding a comment to clarify the purpose of the latching condition in this gesture block for better maintainability.
if model.latching {
This fixes the stuck key issue on key edge taps. It appears we had an external trigger for notes on and off that wasn't an issue until iOS 18.
@aure I'm not sure if this change affects anything you are working with, but it fixed my issue.