Skip to content

Commit

Permalink
refactor: keep progress
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillzyusko committed Jan 14, 2025
1 parent 0881ba2 commit 54e48a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions ios/interactive/KeyboardAreaExtender.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ class KeyboardAreaExtender: NSObject {
}

public func hide() {
// currentInputAccessoryView?.updateHeight(to: 0.0)
// superview?.layoutIfNeeded()
currentInputAccessoryView?.hide()
}

public func updateHeight(_ to: CGFloat, _ nativeID: String) {
Expand All @@ -46,7 +45,7 @@ class KeyboardAreaExtender: NSObject {
forTextInputNativeID: responder.nativeID),
responder?.inputAccessoryView == nil
{
currentInputAccessoryView = InvisibleInputAccessoryView(height: CGFloat(offset))
currentInputAccessoryView = InvisibleInputAccessoryView(height: CGFloat(truncating: offset))

activeTextInput.inputAccessoryView = currentInputAccessoryView
activeTextInput.reloadInputViews()
Expand Down
4 changes: 2 additions & 2 deletions ios/observers/KeyboardMovementObserver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class KeyboardMovementObserver: NSObject {
private var tag: NSNumber = -1
private var animation: KeyboardAnimation?
private var didShowDeadline: Int64 = 0
// class intances
// external class instances
private let eventsIgnorer = KeyboardEventsIgnorer()

@objc public init(
Expand Down Expand Up @@ -161,7 +161,7 @@ public class KeyboardMovementObserver: NSObject {

prevKeyboardPosition = position
// TODO: needs here? Why in onStart/onEnd after interactive gesture we get keyboard height as 386?
(UIResponder.current?.inputAccessoryView as? InvisibleInputAccessoryView)?.hide()
KeyboardAreaExtender.shared.hide()
///
onEvent(
"onKeyboardMoveInteractive",
Expand Down

0 comments on commit 54e48a6

Please sign in to comment.