Skip to content

feat: Disable long-tap (Autofill) for Col1 - WPB-18850 #3377

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

Open
wants to merge 13 commits into
base: release/cycle-3.120
Choose a base branch
from

Conversation

KaterinaWire
Copy link
Contributor

@KaterinaWire KaterinaWire commented Jul 22, 2025

Issue

It should not be possible to long-tap on an input and select iOS options to fill the text field such as

  • live-text (ScanText)
  • enter password from password manager
  • enter contact information from iCloud

Currently, long pressing on any input field shows an AutoFill menu (from iOS 17) that redirects to Contacts, Passwords, ScanText options, which should be disabled for Col builds.
https://developer.apple.com/documentation/uikit/uimenu/identifier-swift.struct/autofill

We have several subclasses of the UITextField. This PR contains ContextMenuControllableTextField that disabled AutoFill context menu.

Testing

Checklist

  • Title contains a reference JIRA issue number like [WPB-XXX].
  • Description is filled and free of optional paragraphs.
  • Adds/updates automated tests.

UI accessibility checklist

If your PR includes UI changes, please utilize this checklist:

  • Make sure you use the API for UI elements that support large fonts.
  • All colors are taken from WireDesign.ColorTheme or constructed using WireDesign.BaseColorPalette.
  • New UI elements have Accessibility strings for VoiceOver.

@KaterinaWire KaterinaWire marked this pull request as ready for review July 25, 2025 06:07
Copy link
Contributor

github-actions bot commented Jul 25, 2025

Test Results

    3 files     14 suites   2m 33s ⏱️
1 961 tests 1 933 ✅ 28 💤 0 ❌
1 971 runs  1 943 ✅ 28 💤 0 ❌

Results for commit cce576c.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@samwyndham samwyndham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work. It is a shame to have to use a base class for this but I don't think there is a better solution.


private let isContextMenuAllowed: Bool

public init(frame: CGRect, isContextMenuAllowed: Bool) {
Copy link
Contributor

@samwyndham samwyndham Jul 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Just to confirm, does this have to be dynamically known or can it be known at compile time. My personal preference would for this kind of functionality to be enabled/disabled per build so that isContextMenuAllowed parameter is not necessary. I would also argue that product should push for this - perhaps a topic for when we move to scopes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants