NativeScript / NativeScript/NativeScript

TextField text cursor going to the first position after value update

Open
#5,873 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

From @yassern on May 25, 2018 19:49

This bug is android only, I have a Slider and a TextField that have the same ngModel attribute reference and when the value of that attribute is updated, the cursor goes to the first position of the input, no matters if the user use the textfield or the slider.

Sample project:
https://play.nativescript.org/?template=play-ng&id=O0oLGQ&v=1

Copied from original issue: NativeScript/nativescript-angular#1348


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 with the linked NativeScript Playground sample and reproduce the Android-only behavior using the Slider and TextField sharing the same ngModel reference. Trace the TextField value-update handling, then verify that editing or sliding preserves the cursor position instead of moving it to the first position.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, angular, typescript
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.