Skip to content

Fix search dialog close on touch devices (iPad without keyboard)#49

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-search-box-closure-ipad
Draft

Fix search dialog close on touch devices (iPad without keyboard)#49
Copilot wants to merge 2 commits intomainfrom
copilot/fix-search-box-closure-ipad

Conversation

Copy link

Copilot AI commented Mar 12, 2026

On touch devices without a physical keyboard (e.g. iPad), there was no way to dismiss the search dialog — no ESC key, no tappable close target, and clicking outside did nothing.

Changes

  • "Close [esc]" → clickable button: Converted the decorative <div> hint at the bottom of the search dialog into a <button> that closes the dialog on tap/click via this.closest('dialog').close()
  • Backdrop tap-to-close: Added onclick="if(event.target===this)this.close()" to the <dialog> element so tapping outside the search panel dismisses it
  • Updated both search.templ and the generated search_templ.go
- <div class="o-inline-flex o-gap-2 o-items-center o-text-sm dark:o-text-white">
+ <button onclick="this.closest('dialog').close()"
+         class="o-inline-flex o-gap-2 o-items-center o-text-sm dark:o-text-white o-cursor-pointer">
    <span class="o-text-caption">Close</span>
    @KBD("esc")
- </div>
+ </button>

ESC key and ⌘K/Ctrl+K behavior are unchanged.

Related

Closes #[issue]

Checklist

  • I have read and followed the contributing guidelines
  • I have updated documentation where necessary
  • Existing tests pass
  • Added tests for new functionality (if applicable)
  • Manually verified changes work as expected
  • I have considered the impact on existing functionality
Original prompt

This section details on the original issue you should resolve

<issue_title>Closing Search Box on iPad</issue_title>
<issue_description>Hey,

First off, thanks for openchangelog, it's awesome. And this isn't anything major, but something one of us noticed and would be a nice to have fix:

On an iPad using [Apple]K to search, and ESC to close the search works fine with a keyboard…

BUT without a keyboard… touching [Apple]K to enter search, but closing the search box is not possible, as the iPad software-keyboard doesn’t have an ESC key.

Touching another part of the screen doesn’t close the search box. The [Close] and [ESC] onscreen icons aren’t currently “clickable”.

Thanks
Rob</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

… key

Co-authored-by: JonasHiltl <71456708+JonasHiltl@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix closing search box on iPad without keyboard Fix search dialog close on touch devices (iPad without keyboard) Mar 12, 2026
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.

Closing Search Box on iPad

2 participants