plotly / plotly/dash

dcc.Input selectionStart not functioning as expected

Open
#2,716 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P3 sev-2
Dominant language
Python
Stars
24.4k
Forks
2.3k
Avg merge
2d 7h
Merged PRs (30d)
13

Description

Describe the bug

dcc.Input properties selectionStart and selectionEnd not updating and returning None or initial set value

Expected behavior

Expect that the values of selectionStart (or selectionEnd) will return the offset into the element's text content of the first (or last) selected character.

Screenshots

This is reported in the following community posts:
https://community.plotly.com/t/explaining-selectionstart-in-dash-input-component/39023
https://community.plotly.com/t/selectionstart-and-selectionend-doesnt-seem-to-work-for-input-not-available-for-textarea/54746
https://community.plotly.com/t/selection-in-dash-component-not-working/36707
Screen Shot 2023-12-20 at 3 33 41 PM

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

No source file or test is named; start by reproducing the issue with dcc.Input and checking how selectionStart and selectionEnd are exposed. Compare the observed values with the expected text-selection offsets described here and in the linked community posts; done means both properties update and return the current selection.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, react
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.