Skip to content

Commit

Permalink
chore: update list of bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillzyusko committed Jan 14, 2025
1 parent 54e48a6 commit 5cbfc48
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 8 additions & 1 deletion TODO
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@
- (x) keyboard hidden -> remove inputAccessoryView - done in resignFirstResponder
- (x) iOS 16 - after attaching fake iav we dispatch onEnd with height - 248 (298 - 50) -> ignore events after attaching iav, because in keyboardDidAppear `position` can be a random value (291 or 341)
- (x) text input grow -> can not make interactive gesture (Optional(424.6666666666667) 424.66666666666674) - maybe because of frequent conversions to CGFloat? <- fixed via rounding
- show after interactive - keyboard height is 386
- 1 show after interactive - keyboard height is 386
- 2 show after interactive - iav is not attached again
- 3 two events get dispatched when we remove iav in onInteractive - (dispatch `shouldIgnoreKeyboardEvents` in .hide (KEA)? - doesn't work because swizzle calls .hide when keyboard appear)

:: call actual code for hide only once
::: dispatch ignore event when we actually hide iav (will fix 3)
::: (add `lastOffset`) - will fix 1 <- last time when I added it was resetting somehow, need to figure out where and why exactly
::: add code in `keyboardDidAppear` in KAE to increase/attach iav again (will fix 2)
5 changes: 4 additions & 1 deletion ios/interactive/KeyboardAreaExtender.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class KeyboardAreaExtender: NSObject {
}

@objc private func keyboardDidAppear(_: Notification) {
print("KEA - keyboardDidAppear \(Date.currentTimeStamp)")
let responder = UIResponder.current
if let activeTextInput = responder as? TextInput,
let offset = KeyboardOffsetProvider.shared.getOffset(
Expand All @@ -50,7 +51,9 @@ class KeyboardAreaExtender: NSObject {
activeTextInput.inputAccessoryView = currentInputAccessoryView
activeTextInput.reloadInputViews()

NotificationCenter.default.post(name: .shouldIgnoreKeyboardEvents, object: nil, userInfo: ["ignore": true])
NotificationCenter.default.post(
name: .shouldIgnoreKeyboardEvents, object: nil, userInfo: ["ignore": true]
)

print("Attaching `inputAccessoryView` \(Date.currentTimeStamp)")
}
Expand Down

0 comments on commit 5cbfc48

Please sign in to comment.