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.
PR Template - RTL Checkbox Click Area Fix
Title
Fix RTL checkbox click area issue
Description
This PR fixes a critical issue with checkbox click areas in RTL (Right-to-Left) text direction mode. Previously, when using RTL text direction, checkboxes were visually positioned correctly on the right side but remained clickable only in their original LTR position on the left side, creating a confusing user experience.
Current behavior: In RTL mode, checkboxes appear on the right but can only be clicked on the left side where they would be in LTR mode.
New behavior: In RTL mode, checkboxes are both visually positioned and clickable on the right side, matching user expectations.
Motivation: This fix ensures consistent and intuitive checkbox interaction across different text directions, particularly important for Arabic, Hebrew, and other RTL languages.
Related Issues
No specific GitHub issue was referenced, but this addresses a user-reported bug regarding RTL checkbox interaction.
Type of Change
Technical Details
Files Modified:
lib/src/editor/widgets/text/text_line.dart
- FixedhitTestChildren()
methodCHANGELOG.md
- Added entry under [Unreleased] sectionRoot Cause:
In
text_line.dart
, thepaint()
method correctly positioned checkboxes for RTL text direction, but thehitTestChildren()
method continued to use the original LTR offset for hit testing, causing a mismatch between visual position and clickable area.Solution:
Modified the
hitTestChildren()
method to apply the same RTL positioning logic as thepaint()
method:Testing:
CHANGELOG Entry Added:
Copy-Paste Ready Sections:
For PR Title:
For PR Description:
For Type of Change (mark Bug fix):