NativeScript / NativeScript/NativeScript

TextField blur firing multiple times when pressing return key (iOS)

Open
#7,588 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

backlog bug os: ios
Dominant language
TypeScript
Stars
25.7k
Forks
1.7k
Avg merge
1d 5h
Merged PRs (30d)
35

Description

TextField blur is firing multiple times when pressing the return button on the keyboard. In the source, this seems to be because both 'textFieldDidEndEditing' and 'textFieldShouldReturn' call 'dismissSoftInput.' Each time 'dismissSoftInput' is called, it fires a blur event whether the UITextField was the firstResponder or not.

When hitting the 'return' key, the blur should only be called once.

(Something similar happens on Android, but for other reasons ( #5820 ))


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the iOS TextField implementation around textFieldDidEndEditing and textFieldShouldReturn, then inspect how dismissSoftInput emits blur events. Done means pressing the Return key produces exactly one blur event instead of multiple events.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.