Restrict the delete function if not the first responder. Fixes #3642

This commit is contained in:
Maurice Parker 2022-08-02 18:10:09 -05:00
parent 28cd2fc0cf
commit 3a9e3c8050

View File

@ -523,6 +523,13 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
}
}
override func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool {
if action == #selector(UIResponder.delete(_:)) {
return isFirstResponder
}
return super.canPerformAction(action, withSender: sender)
}
@objc func expandSelectedRows(_ sender: Any?) {
if let indexPath = coordinator.currentFeedIndexPath, let node = coordinator.nodeFor(indexPath) {
coordinator.expand(node)