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

Update text selection when toggling checkbox #441

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

amantoux
Copy link
Member

@amantoux amantoux commented Dec 19, 2024

When toggling a checkbox the cursor is set at the offset of the checkbox's line start

Fixes issues addressed by PR #400

@amantoux amantoux requested review from Amir-P and removed request for Amir-P December 19, 2024 11:13
@amantoux amantoux marked this pull request as draft December 21, 2024 11:28
@amantoux amantoux force-pushed the update_text_selection_when_toggling_checkbox branch from df73bcb to ce001ea Compare December 29, 2024 11:21
Copy link

codecov bot commented Dec 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.24%. Comparing base (6abce16) to head (ad0f7c3).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #441   +/-   ##
=======================================
  Coverage   88.24%   88.24%           
=======================================
  Files          62       62           
  Lines       10630    10637    +7     
=======================================
+ Hits         9380     9387    +7     
  Misses       1250     1250           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@amantoux amantoux force-pushed the update_text_selection_when_toggling_checkbox branch from b41905f to a044bb1 Compare December 29, 2024 11:24
@amantoux
Copy link
Member Author

@Amir-P can you please review?
Essentially, this allows the check box to render it's own state while silently updating the document via the controller.
This avoids the re-build of the editor that would scroll to the cursor position while preserving the current text selection.

@amantoux amantoux requested a review from Amir-P December 29, 2024 11:30
@amantoux amantoux marked this pull request as ready for review December 29, 2024 11:30
@amantoux amantoux force-pushed the update_text_selection_when_toggling_checkbox branch from a044bb1 to c9fd3eb Compare December 29, 2024 11:34
@amantoux amantoux force-pushed the update_text_selection_when_toggling_checkbox branch from c9fd3eb to ad0f7c3 Compare December 29, 2024 11:35
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.

1 participant