Skip to content

Commit 618ac0d

Browse files
committed
Fix keyboard dismiss tracking
1 parent fd8360a commit 618ac0d

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
{
2-
"originHash" : "62e304d0a9a8b63c3b77d92c52d73e65ebbc0047afdf63494a51b56412a4d51c",
32
"pins" : [
43
{
54
"identity" : "swiftui-introspect",
65
"kind" : "remoteSourceControl",
76
"location" : "https://github.com/siteline/swiftui-introspect",
87
"state" : {
9-
"revision" : "668a65735751432b640260c56dfa621cec568368",
10-
"version" : "1.2.0"
8+
"revision" : "807f73ce09a9b9723f12385e592b4e0aaebd3336",
9+
"version" : "1.3.0"
1110
}
1211
}
1312
],
14-
"version" : 3
13+
"version" : 2
1514
}

Sources/PopupView/Utils.swift

+2-5
Original file line numberDiff line numberDiff line change
@@ -375,12 +375,9 @@ class KeyboardHeightHelper: ObservableObject {
375375
}
376376

377377
@objc private func onKeyboardWillHideNotification(_ notification: Notification) {
378-
guard let userInfo = notification.userInfo,
379-
let keyboardRect = userInfo[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect else { return }
380-
381378
DispatchQueue.main.async {
382-
self.keyboardHeight = keyboardRect.height
383-
self.keyboardDisplayed = true
379+
self.keyboardHeight = 0
380+
self.keyboardDisplayed = false
384381
}
385382
}
386383
}

0 commit comments

Comments
 (0)