Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password manager: Fix tabbing between text fields #3857

Merged
merged 1 commit into from
Feb 11, 2025
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
11 changes: 11 additions & 0 deletions DuckDuckGo/SecureVault/View/PasswordManagementViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ final class PasswordManagementViewController: NSViewController {
self.updateEmptyState(state: self.listModel?.emptyState)

self.searchField.isEditable = !isEditing

self.recalculateKeyViewLoop()
})
}
}
Expand Down Expand Up @@ -531,6 +533,15 @@ final class PasswordManagementViewController: NSViewController {
itemContainer.addSubview(view)
itemContainer.wantsLayer = true
itemContainer.layer?.masksToBounds = false

recalculateKeyViewLoop()
}

private func recalculateKeyViewLoop() {
// Manually call NSWindow.recalculateKeyViewLoop() after the item view changes so that user can tab between text fields. This is necessary because MainWindow sets autorecalculatesKeyViewLoop to false.
DispatchQueue.main.async {
self.view.window?.recalculateKeyViewLoop()
}
}

private func doSaveCredentials(_ credentials: SecureVaultModels.WebsiteCredentials) {
Expand Down
Loading