mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-10-12 06:52:13 +00:00
Pressing Enter in the search box closed the modal without running the search; you had to click Search with the mouse. Implicit form submission fires a click at the submit button, and a keyboard-synthesised click carries detail 0 and coordinates of 0,0. The backdrop-click handler only tested the coordinates against the dialog's bounding box, so 0,0 read as "outside" - it closed the dialog and blanked the input while the click was still bubbling. By the time the submit ran, `q` was empty and `required` rejected it, so nothing was searched. Ignore clicks with detail 0 - only a real pointer can hit the backdrop. Verified with Chromium against a local instance: Enter now lands on /?q=<term>, and mouse submit, backdrop click, Escape and Enter-on-empty all still behave. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>