bitwarden / bitwarden/ios

[PM-33062] iOS: Autocomplete jumps text cursor to end of secure note, disrupting mid-note edits

Open
#2,397 2 comments 0 reactions 0 assignees View on GitHub
app:password-manager bug
Dominant language
Swift
Stars
684
Forks
154
Avg merge
7d 2h
Merged PRs (30d)
32

Description

### Steps To Reproduce

1. Go to **Vault**, then click **+ (Add Item)**, then **Secure Note**
2. Start typing some text and wait for iOS autocomplete (predictive text) to engage. A good way to quickly reproduce this bug is to type `wont` without the proper apostrophe and it will autocorrect to `won't`. If you have text below this line you just autocorrected, it will jump the pointer (or "cursor") on the iPhone to the Page End of the entire Secure Note text.
3. Here is a video demonstration https://www.youtube.com/watch?v=a0fK7eHQPqs
4. The interesting thing is that if you have one extra space after your cursor pointer (i.e. `i wont `), then it won't skip to the very end of the entire text field. However, that is a normal or grammatically correct way to have empty spaces at the end of your sentences. I've included links below that describe solutions to this bug.
5. Here are my client debug versions & hashes https://send.bitwarden.com/#Y2EdUaicQEy3rrQBAWGPDQ/iLUjHpjHf2qobGdoDRKrhw

**Triggers Bug**
```
i wont

It does a page end jump to here.
```
**Causes bypass/exemption to bug**
```
i wont

It doesn't jump because of the space condition changing behavior.
```

Related:
[iOS TextField - autocomplete adds blank character](https://stackoverflow.com/questions/51252525/ios-textfield-autocomplete-adds-blank-character)
[Text field sudden jump when text is typed using keyboard](https://github.com/hackiftekhar/IQKeyboardManager/issues/1733)

### Expected Result

It shouldn't jump to the end of the entire text field. (I'm using iPhone) but it's very similar to as if I clicked the "Page End" key on a PC keyboard. I don't want to jump to the end of the text field just because I spelled a word incorrectly. I want to **retain my pointer** position and not jump to a different location of the text field.

Fixes:
[iOS TextField - autocomplete adds blank character](https://stackoverflow.com/questions/51252525/ios-textfield-autocomplete-adds-blank-character)
[Text field sudden jump when text is typed using keyboard](https://github.com/hackiftekhar/IQKeyboardManager/issues/1733)

### Actual Result

(I'm using iPhone) but it's very similar to as if I clicked the "Page End" key on a PC keyboard. I'm jumped all the way to the last index of the text field.

```
i wont^^^I WAS HERE BEFORE AUTOCORRECT

It does a page end jump to here.^^^I AM SENT HERE
```

### Screenshots or Videos

Here is a video demonstration https://www.youtube.com/watch?v=a0fK7eHQPqs

### Additional Context

_No response_

### Build Version

2026.2.0 (2924)

### What server are you connecting to?

US

### Self-host Server Version

_No response_

### Environment Details

_No response_

### Issue Tracking Info

- [x] I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.

Contributor guide

Open the contributing guide

Research direction

Start in the Vault flow by opening Add Item, choosing Secure Note, and reproducing the cursor jump with iOS autocomplete on text above another paragraph. Trace the secure-note text editor entry point and verify that autocorrect keeps the insertion point in its original location rather than moving it to the end of the field.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.