[#1488 & #1506] Focus most commonly edited parameter after preset selection + Highlight spinner text after focus gained #1508
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes #1488 and #1506. If setting focus on any spinner text field (either by clicking on it when it is not yet in focus, or by pressing the 'Tab' key until that object is in focus), all the text in the text field is highlighted/selected (fixing #1506). When you click again in the text field, e.g. the text '123' is highlighted and you click between the 1 and 2, then the highlight will stop and the cursor will be placed between 1 and 2, so '1|23'.
For the following components, after selecting a preset, the length spinner text field is highlighted:
For the following components, the axial position spinner is highlighted:
I also took the liberty of changing the text of the Coupler component button to 'Tube Coupler', since that's also the title of the component edit dialog after adding the coupler.
Demo:
Screen.Recording.2022-07-02.at.15.56.27.mp4