GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix 2FA code paste and macOS autofill in PIN code input by rursache · Pull Request #820 · XcodesOrg/XcodesApp

Conversation

@rursache

@rursache rursache commented Jun 12, 2026

Copy link
Copy Markdown

Problem

The 2FA/SMS code entry uses six independently focused text fields. Pasting a code only kept one digit (#587) and macOS one-time code autofill from Messages/Mail broke after the first digit because the system inserts the whole code into the focused field and the focus jumping between fields aborts the insertion (#788).

Fix

Rewrote PinCodeTextView around the standard one-time code pattern: a single invisible NSTextField with contentType = .oneTimeCode overlays the row and owns all input, while the digit boxes are display-only. Pasting now works from any state, the system autofill suggestion appears (field auto-focuses when the sheet opens) and inserts the full code, and pasting a full code over partially entered digits replaces them. The public PinCodeTextField SwiftUI API is unchanged.

Note: the SMS being deleted after autofill is the system "Clean Up Automatically" feature and not controllable by the app.

Testing

Verified with a headless harness driving the real field editor: paste into empty field, paste over partial input, paste with separators, digit by digit typing, backspace, overflow capping, autofill-style bulk insertText and external reset via the binding. App builds and runs.

Fixes #587
Fixes #788

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rursache
Fix 2FA code paste and macOS autofill in PIN code input
e792f72
Replace the six independently focused NSTextFields with a single
invisible input field (contentType = .oneTimeCode) overlaying
display-only digit boxes. All input now lands in one field, so
pasting a full code works from any state and the system one-time
code autofill from Messages/Mail inserts the whole code instead
of breaking after the first digit when focus jumped between
fields.

Fixes XcodesOrg#587, fixes XcodesOrg#788
@MattKiazyk

MattKiazyk commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Hi @rursache

Was this not fixed via #778 that is available in the latest 4.0.3 release?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rursache

rursache commented Jun 12, 2026

Copy link
Copy Markdown
Author

just had the same issue but indeed i'm on 4.0.2 not 0.3. will check again and close the PR if that the case

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jacobcxdev jacobcxdev mentioned this pull request Aug 12, 2026
Port applicable upstream pull requests jacobcxdev/XcodesApp#13
Merged

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

SMS Autofill doesn't work Pasting 2FA SMS codes will not fill all the textfields

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@rursache @MattKiazyk
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.