From 867c333ff7a802c8aba4fbf3bdc8a8f37d01028e Mon Sep 17 00:00:00 2001 From: Felix Schwarz Date: Mon, 10 Jun 2024 10:42:30 +0200 Subject: [PATCH] - remove "Drag Item" accessibility custom action for "Quick Access" search suggestions (fixes finding in #1349) --- .../AccountControllerSearchViewController.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ownCloudAppShared/Client/Account/Controller/AccountControllerSearchViewController.swift b/ownCloudAppShared/Client/Account/Controller/AccountControllerSearchViewController.swift index 95fe9c15a..6e3a0ca34 100644 --- a/ownCloudAppShared/Client/Account/Controller/AccountControllerSearchViewController.swift +++ b/ownCloudAppShared/Client/Account/Controller/AccountControllerSearchViewController.swift @@ -81,4 +81,12 @@ class AccountControllerSearchViewController: ClientItemViewController { return suggestions } + + override func search(for viewController: SearchViewController, content: SearchViewController.Content?) { + // Disable dragging of items, so keyboard control does not include "Drag Item" + // in the accessibility actions invoked with Tab + Z for (Quick Access) suggestions + dragInteractionEnabled = (content?.type == .suggestion) ? false : true + + super.search(for: viewController, content: content) + } }