mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-27 11:37:59 -06:00
A click on a check box or radio button focuses it, so Tab, Space and the arrows reach it (#2223). The page hands the click to the field, and the field overlay toggles the box in the same frame unless the click landed elsewhere. That check read hover_pos, which is None on the frame egui reports a tap: egui-winit sends PointerGone with every touch release, and winit reports Windows pen input as touch. So a finger or pen tap counted as a click away. The focus closed and the toggle was dropped: a tap left a check box unticked and unfocused, and a tap on a radio button selected nothing. The check now uses the overlay's clicked_outside, which reads interact_pos, as the other field editors do. Tests: touch_tap_ticks_a_check_box runs again. tests/it/editor_taps.rs taps a focused check box and the other button of a focused radio group, each with a mouse click as the control. Each checks that the focus stays and the tap toggles, and for the radio group that the arrows still move within it. With the fix reverted, the three tap tests fail and the controls pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>