Skip to content
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

fix: Text input cursor jumps to first position when writing long text #2413

Merged
merged 6 commits into from
May 27, 2023

Conversation

AshishBarvaliya
Copy link
Member

New Pull Request Checklist

Issue Description

Updated TextInput Component

Closes: #2412

Approach

set selection range when focusing Textarea.

TODOs before merging

@parse-github-assistant
Copy link

parse-github-assistant bot commented Apr 9, 2023

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@AshishBarvaliya AshishBarvaliya changed the title Fix: TextInput component - cursor moving to start Fix: fix cursor moving to start Apr 9, 2023
@AshishBarvaliya AshishBarvaliya changed the title Fix: fix cursor moving to start Fix: Add setSelectionRange when focusing Textarea. Apr 9, 2023
@AshishBarvaliya AshishBarvaliya changed the title Fix: Add setSelectionRange when focusing Textarea. fix: Add setSelectionRange when focusing Textarea. Apr 9, 2023
@AshishBarvaliya AshishBarvaliya changed the title fix: Add setSelectionRange when focusing Textarea. fix: textinput component - cursor moving to start Apr 9, 2023
@parse-github-assistant
Copy link

I will reformat the title to use the proper commit message syntax.

@parse-github-assistant parse-github-assistant bot changed the title fix: textinput component - cursor moving to start fix: Textinput component - cursor moving to start Apr 9, 2023
@uffizzi-cloud
Copy link

uffizzi-cloud bot commented Apr 9, 2023

Uffizzi Ephemeral Environment deployment-21718

⌚ Updated Apr 09, 2023, 22:44 UTC

☁️ https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2413

📄 View Application Logs etc.

What is Uffizzi? Learn more

patelmilanun
patelmilanun previously approved these changes Apr 14, 2023
@mtrezza mtrezza requested a review from a team April 15, 2023 14:20
@mtrezza mtrezza changed the title fix: Textinput component - cursor moving to start fix: Text input cursor jumps to first position on long text input May 27, 2023
@mtrezza mtrezza changed the title fix: Text input cursor jumps to first position on long text input fix: Text input cursor jumps to first position when writing long text May 27, 2023
@mtrezza mtrezza merged commit 422ffb2 into parse-community:alpha May 27, 2023
Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

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

Looks good!

parseplatformorg pushed a commit that referenced this pull request May 27, 2023
# [5.2.0-alpha.6](5.2.0-alpha.5...5.2.0-alpha.6) (2023-05-27)

### Bug Fixes

* Text input cursor jumps to first position when writing long text ([#2413](#2413)) ([422ffb2](422ffb2))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 5.2.0-alpha.6

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label May 27, 2023
parseplatformorg pushed a commit that referenced this pull request Jun 8, 2023
# [5.2.0-beta.2](5.2.0-beta.1...5.2.0-beta.2) (2023-06-08)

### Bug Fixes

* Back button in data browser disappears after page refresh ([#2421](#2421)) ([6c5f19f](6c5f19f))
* Cannot navigate to nested relation field in data browser ([#2420](#2420)) ([e7ace9e](e7ace9e))
* Dashboard crashes when adding a row with modal in a class that contains a pointer to another class that contains an array of pointers ([#2416](#2416)) ([286269f](286269f))
* Empty table in data browser when navigating back using the "back” button ([#2423](#2423)) ([6f3dab6](6f3dab6))
* File uploading status not updating in data browser ([#2422](#2422)) ([e761f97](e761f97))
* Incorrect date picker position in data browser filter dialog ([#2425](#2425)) ([b96b48f](b96b48f))
* Option missing for Parse Config parameter to require master key ([#2440](#2440)) ([6623369](6623369))
* Scroll position is preserved when re-opening the same class in data browser via navigation bar ([#2445](#2445)) ([667675c](667675c))
* Text input cursor jumps to first position when writing long text ([#2413](#2413)) ([422ffb2](422ffb2))

### Features

* Add links to users and roles in ACL dialog and handle invalid entries ([#2436](#2436)) ([a20cb8e](a20cb8e))
* Add visual configurator for Parse Dashboard settings ([#2406](#2406)) ([228d839](228d839))
parseplatformorg pushed a commit that referenced this pull request Jun 8, 2023
# [5.2.0-beta.2](5.2.0-beta.1...5.2.0-beta.2) (2023-06-08)

### Bug Fixes

* Back button in data browser disappears after page refresh ([#2421](#2421)) ([6c5f19f](6c5f19f))
* Cannot navigate to nested relation field in data browser ([#2420](#2420)) ([e7ace9e](e7ace9e))
* Dashboard crashes when adding a row with modal in a class that contains a pointer to another class that contains an array of pointers ([#2416](#2416)) ([286269f](286269f))
* Empty table in data browser when navigating back using the "back” button ([#2423](#2423)) ([6f3dab6](6f3dab6))
* File uploading status not updating in data browser ([#2422](#2422)) ([e761f97](e761f97))
* Incorrect date picker position in data browser filter dialog ([#2425](#2425)) ([b96b48f](b96b48f))
* Option missing for Parse Config parameter to require master key ([#2440](#2440)) ([6623369](6623369))
* Scroll position is preserved when re-opening the same class in data browser via navigation bar ([#2445](#2445)) ([667675c](667675c))
* Text input cursor jumps to first position when writing long text ([#2413](#2413)) ([422ffb2](422ffb2))

### Features

* Add links to users and roles in ACL dialog and handle invalid entries ([#2436](#2436)) ([a20cb8e](a20cb8e))
* Add visual configurator for Parse Dashboard settings ([#2406](#2406)) ([228d839](228d839))
parseplatformorg pushed a commit that referenced this pull request Jun 8, 2023
# [5.2.0-beta.2](5.2.0-beta.1...5.2.0-beta.2) (2023-06-08)

### Bug Fixes

* Back button in data browser disappears after page refresh ([#2421](#2421)) ([6c5f19f](6c5f19f))
* Cannot navigate to nested relation field in data browser ([#2420](#2420)) ([e7ace9e](e7ace9e))
* Dashboard crashes when adding a row with modal in a class that contains a pointer to another class that contains an array of pointers ([#2416](#2416)) ([286269f](286269f))
* Empty table in data browser when navigating back using the "back” button ([#2423](#2423)) ([6f3dab6](6f3dab6))
* File uploading status not updating in data browser ([#2422](#2422)) ([e761f97](e761f97))
* Incorrect date picker position in data browser filter dialog ([#2425](#2425)) ([b96b48f](b96b48f))
* Option missing for Parse Config parameter to require master key ([#2440](#2440)) ([6623369](6623369))
* Scroll position is preserved when re-opening the same class in data browser via navigation bar ([#2445](#2445)) ([667675c](667675c))
* Text input cursor jumps to first position when writing long text ([#2413](#2413)) ([422ffb2](422ffb2))

### Features

* Add links to users and roles in ACL dialog and handle invalid entries ([#2436](#2436)) ([a20cb8e](a20cb8e))
* Add visual configurator for Parse Dashboard settings ([#2406](#2406)) ([228d839](228d839))
parseplatformorg pushed a commit that referenced this pull request Jun 10, 2023
# [5.2.0-beta.2](5.2.0-beta.1...5.2.0-beta.2) (2023-06-10)

### Bug Fixes

* Back button in data browser disappears after page refresh ([#2421](#2421)) ([6c5f19f](6c5f19f))
* Cannot navigate to nested relation field in data browser ([#2420](#2420)) ([e7ace9e](e7ace9e))
* Dashboard crashes when adding a row with modal in a class that contains a pointer to another class that contains an array of pointers ([#2416](#2416)) ([286269f](286269f))
* Empty table in data browser when navigating back using the "back” button ([#2423](#2423)) ([6f3dab6](6f3dab6))
* File uploading status not updating in data browser ([#2422](#2422)) ([e761f97](e761f97))
* Hitting backspace key in data browser crashes dashboard ([#2456](#2456)) ([32aeea2](32aeea2))
* Incorrect date picker position in data browser filter dialog ([#2425](#2425)) ([b96b48f](b96b48f))
* Option missing for Parse Config parameter to require master key ([#2440](#2440)) ([6623369](6623369))
* Scroll position is preserved when re-opening the same class in data browser via navigation bar ([#2445](#2445)) ([667675c](667675c))
* Text input cursor jumps to first position when writing long text ([#2413](#2413)) ([422ffb2](422ffb2))

### Features

* Add export of saved data browser filters via `classPreference` settings ([#2455](#2455)) ([f56f946](f56f946))
* Add filter views to save frequently used filters in data browser ([#2404](#2404)) ([a9ec3a9](a9ec3a9))
* Add links to users and roles in ACL dialog and handle invalid entries ([#2436](#2436)) ([a20cb8e](a20cb8e))
* Add visual configurator for Parse Dashboard settings ([#2406](#2406)) ([228d839](228d839))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 5.2.0-beta.2

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Jun 10, 2023
@mathieulb
Copy link

My team is on multiple browsers/OSes and we have a similar bug with beta2 and alpha27, but instead it jumps to the end of the text. It seems like the bug I see is the fix for issue 2413. What I do :

  • Click in the middle of short text
  • Type enough text to make Dashboard switch to the layout of long text

What happens :

  • Cursor jumps to the end
  • Undo history is cleared
  • another issue making it worse when can't undo : can't cancel either, as the Escape key does not do anything, there is no Cancel button, and any blur (un-focus) event saves the mistake I made, and even closing the tab saves it. The only way out is to press reload (with or without shift). No way to revert to any previous value.

If undo history can't be carried between two different widgets that you are swapping (INPUT to TEXTAREA and back), then surely the whole concept of swapping widgets is the wrong solution to whatever problem it is trying to solve.

@mtrezza
Copy link
Member

mtrezza commented Aug 3, 2023

@mathieulb could you open a new issue and fill out the template.

parseplatformorg pushed a commit that referenced this pull request Sep 15, 2023
# [5.2.0](5.1.0...5.2.0) (2023-09-15)

### Bug Fixes

* Back button in data browser disappears after page refresh ([#2421](#2421)) ([6c5f19f](6c5f19f))
* Cannot navigate to nested relation field in data browser ([#2420](#2420)) ([e7ace9e](e7ace9e))
* Dashboard crashes when adding a row with modal in a class that contains a pointer to another class that contains an array of pointers ([#2416](#2416)) ([286269f](286269f))
* Empty table in data browser when navigating back using the "back” button ([#2423](#2423)) ([6f3dab6](6f3dab6))
* File uploading status not updating in data browser ([#2422](#2422)) ([e761f97](e761f97))
* Hitting backspace key in data browser crashes dashboard ([#2456](#2456)) ([32aeea2](32aeea2))
* Incorrect date picker position in data browser filter dialog ([#2425](#2425)) ([b96b48f](b96b48f))
* Option missing for Parse Config parameter to require master key ([#2440](#2440)) ([6623369](6623369))
* Scroll position is preserved when re-opening the same class in data browser via navigation bar ([#2445](#2445)) ([667675c](667675c))
* Text input cursor jumps to first position when writing long text ([#2413](#2413)) ([422ffb2](422ffb2))
* Uncaught error when editing Number field in Edit Row dialog ([#2401](#2401)) ([26bd6fa](26bd6fa))

### Features

* Add export of saved data browser filters via `classPreference` settings ([#2455](#2455)) ([f56f946](f56f946))
* Add filter views to save frequently used filters in data browser ([#2404](#2404)) ([a9ec3a9](a9ec3a9))
* Add links to users and roles in ACL dialog and handle invalid entries ([#2436](#2436)) ([a20cb8e](a20cb8e))
* Add visual configurator for Parse Dashboard settings ([#2406](#2406)) ([228d839](228d839))
* Data types and pointer classes are sorted alphabetically in dialog to add new column ([#2400](#2400)) ([d9d285b](d9d285b))
* Sort Cloud Code Jobs alphabetically ([#2402](#2402)) ([77fc372](77fc372))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 5.2.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When the input field is converted into a text area, the cursor jumps to the start
5 participants