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

Fix #8445: View recovery phrases button is not tappable #8473

Merged
merged 2 commits into from
Nov 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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