Update for focus system

This commit is contained in:
James Magahern
2021-06-10 21:39:32 -07:00
parent f552e80976
commit 52b3f7fe0a
3 changed files with 12 additions and 3 deletions

View File

@@ -78,6 +78,7 @@ class URLBar: ReliefButton
}), for: [ .editingDidBegin, .editingDidEnd ])
textField.keyCommands = [
UIKeyCommand(action: #selector(Self.downKeyPressed), input: UIKeyCommand.inputDownArrow)
.prioritizeOverSystem()
]
addSubview(textField)

View File

@@ -12,4 +12,12 @@ extension UIKeyCommand {
self.init(input: input, modifierFlags: modifiers, action: action)
self.title = title
}
public func prioritizeOverSystem() -> UIKeyCommand {
if #available(iOS 15.0, *) {
self.wantsPriorityOverSystemBehavior = true
}
return self
}
}