Skip to content

fix(ui): taps place the caret where the finger is, also in RTL - #23

Merged
Mohammad-Erhim merged 1 commit into
mainfrom
fix/rtl-touch-caret
Oct 14, 2026
Merged

Mohammad-Erhim merged 1 commit into
mainfrom
fix/rtl-touch-caret

Conversation

@Mohammad-Erhim

Copy link
Copy Markdown
Owner

Hit testing treated the extent of right-to-left rows backwards (taps inside fractions, roots, scripts and Arabic text next to a structure went to the wrong row), and the touch-adjusted mouse position of the browser moved the caret one stop away near line ends. Taps now use the finger's pointer position; extents use min/max.

Verified on a 390x844 touch viewport: tools/probe_rtl_touch.cjs, probe_caret_tap, probe_caret_long, probe_longpress_select; tests 554/554.

🤖 Generated with Claude Code

- hit test: the extent of a right-to-left row (and of a structure in the root row) was taken backwards, so taps
  inside fractions / roots / scripts and Arabic text next to a structure went to the wrong row
- tap: the browser's touch-adjusted mouse position (snapped to a nearby clickable) is replaced by the finger's
  own pointer position, which moved the caret one stop away near the ends of a line
- tools: probe_rtl_touch (taps every stop of every row, LTR and RTL)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Mohammad-Erhim
Mohammad-Erhim merged commit dea0016 into main Oct 14, 2026
2 of 3 checks passed
@vercel

vercel Bot commented Oct 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
math-type-x Building Building Preview Oct 14, 2026 9:51am UTC

This branch was successfully deployed

1 active deployment
Preview — 41cd300e Deployed Oct 14, 2026 by vercel[bot]
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