Skip to content

Conversation

@ShashwatXD
Copy link

Summary

This PR improves upon the fix introduced in PR #925 for issue #924
(cursor jumping to the end when editing URLs).

While PR #925 resolved the main cursor issue, Copilot review identified
follow-up concerns which are addressed here.

Improvements over PR #925

  • Fixes a TextEditingController memory leak on keyId change
  • Preserves full text selection (baseOffset + extentOffset)
  • Fixes a syntax issue in ExtendedTextField
  • Adds widget tests to prevent regression

Related PRs

Tests

Added widget tests covering:

  • Cursor position preservation
  • Text selection preservation
  • Cursor reset when keyId changes

All tests pass locally.

Fixes #924

- Preserve cursor and text selection during URL edits
- Dispose TextEditingController correctly to prevent memory leaks
- Fix syntax issue in ExtendedTextField
- Add widget tests for cursor and selection preservation

Fixes foss42#924
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.

Typing or Removing any character in between URL textfield moves the cursor to the end unexpectedly.

1 participant