Skip to content

input: Show the start of a long value after set_value#2510

Merged
madcodelife merged 2 commits into
longbridge:mainfrom
hlcfan:set-text-cursor
Jun 25, 2026
Merged

input: Show the start of a long value after set_value#2510
madcodelife merged 2 commits into
longbridge:mainfrom
hlcfan:set-text-cursor

Conversation

@hlcfan

@hlcfan hlcfan commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Description

Ensure the cursor is at the start when setting text. This fixes the issue when an input value is long, it shows the latter part of the value after setting value.

How to Test

test_set_value_move_cursor_to_start

Checklist

  • I have read the CONTRIBUTING document and followed the guidelines.
  • Reviewed the changes in this PR and confirmed AI generated code (If any) is accurate.
  • Passed cargo run for story tests related to the changes.
  • Tested macOS, Windows and Linux platforms performance (if the change is platform-specific)

@madcodelife

madcodelife commented Jun 25, 2026

Copy link
Copy Markdown
Member

Thanks for the fix!
I tweaked it to keep the caret at the end (like an HTML input) while scrolling the view to the start.

@madcodelife madcodelife changed the title input: Ensure cursor is at the start when set text input: Show the start of a long value after set_value Jun 25, 2026
@madcodelife madcodelife enabled auto-merge (squash) June 25, 2026 03:40
@madcodelife madcodelife merged commit 49f4b4f into longbridge:main Jun 25, 2026
3 checks passed
@hlcfan hlcfan deleted the set-text-cursor branch June 25, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants