Update for focus system
This commit is contained in:
@@ -78,6 +78,7 @@ class URLBar: ReliefButton
|
||||
}), for: [ .editingDidBegin, .editingDidEnd ])
|
||||
textField.keyCommands = [
|
||||
UIKeyCommand(action: #selector(Self.downKeyPressed), input: UIKeyCommand.inputDownArrow)
|
||||
.prioritizeOverSystem()
|
||||
]
|
||||
addSubview(textField)
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user