Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Fix #8445: View recovery phrases button is not tappable (#8473)
Browse files Browse the repository at this point in the history
  • Loading branch information
nuo-xu authored and Brandon-T committed Dec 14, 2023
1 parent 9af2670 commit 5b40778
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Sources/BraveWallet/Crypto/Onboarding/BackupWalletView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ struct BackupWalletView: View {
// user can press return in field to execute when continue button is disabled
return
}

// Dismiss keyboard for password field before leaving this view #8445.
// Without dismissal, it's possible the scroll view in the detail view
// has incorrect frame (sitting above the area the keyboard used to be)
// which can show the scroll view contents out of the scroll bounds
// but will block tap interactions.
resignFirstResponder()

keyringStore.recoveryPhrase(password: password) { words in
if words.isEmpty {
passwordError = .incorrectPassword
Expand All @@ -42,6 +50,10 @@ struct BackupWalletView: View {
}
}
}

private func resignFirstResponder() {
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
}

var body: some View {
ScrollView(.vertical) {
Expand Down

0 comments on commit 5b40778

Please sign in to comment.