Skip to content

[Feature] Esc should leave the search box #5043

Description

@Alwaysin

I'd like the search box to lose focus if I press a shortcut (wouldn't need to be changeable - instinctively I was pressing Esc to leave so that I can navigate the articles but to my surprise I stayed in the search box).

Activity

  1. added
    Bug (confirmed) 🐞
    on Jan 26, 2023
  2. math-GH commented on Jan 30, 2023

    @math-GH
    Contributor

    @Frenzie : Why is it labeled as bug?

  3. Frenzie commented on Jan 30, 2023

    @Frenzie
    Member

    @math-GH I'm surprised to find this seems to be default browser behavior. Funny, more than two decades and I didn't know escape didn't blur them. :-)

    Edit: that is, after reading the OP and quickly double checking the same happened for me I assumed some key event listener was stealing it from the input element.

  4. removed
    Bug (confirmed) 🐞
    on Jan 30, 2023
  5. added
    Feature Request
    on Feb 5, 2023
  6. Inverle commented on Nov 15, 2025

    @Inverle
    Member

    When I press Esc in the search box, the input also gets cleared.

  7. math-GH commented on Nov 16, 2025

    @math-GH
    Contributor
  8. Inverle commented on Nov 16, 2025

    @Inverle
    Member

    I'm mostly interested whether it makes sense to override the behavior to leave the input instead.

  9. Frenzie commented on Nov 16, 2025

    @Frenzie
    Member

    The type=search input behavior as implemented in Chromia strikes me as user-hostile. Ctrl+Z doesn't even work.

  10. Inverle commented on Nov 16, 2025

    @Inverle
    Member

    Ctrl+Z doesn't even work.

    Works for me

  11. Frenzie commented on Nov 16, 2025

    @Frenzie
    Member

    Press Escape followed by Ctrl+Z.

  12. math-GH commented on Nov 16, 2025

    @math-GH
    Contributor

    Firefox:
    Escape (=deletes the content)
    followed by Ctrl+Z (brings back the deleted content)
    works for me fine

  13. Frenzie commented on Nov 16, 2025

    @Frenzie
    Member

    Chromia = most browsers that aren't Firefox ;-)

  14. Inverle commented on Nov 16, 2025

    @Inverle
    Member

    Press Escape followed by Ctrl+Z.

    Oh interesting

    Now do this:
    Press Escape followed by Ctrl+Z (twice) and then Ctrl+Y
    you'll be surprised by the result (in chrome)

    In Firefox it works fine

  15. math-GH commented on Nov 16, 2025

    @math-GH
    Contributor

    I'm mostly interested whether it makes sense to override the behavior to leave the input instead.

    I do not expect that ESC will leave the focus because it is not an own window.
    The question that would follow: where to put the focus after leaving the search box?
    And why is TAB not used?

  16. Frenzie commented on Nov 16, 2025

    @Frenzie
    Member

    In any case, it seems self-evident that type=search should never be used. Its Firefox behavior is still user-hostile, just not explicitly broken.

  17. Frenzie commented on Nov 16, 2025

    @Frenzie
    Member

    The question that would follow: where to put the focus after leaving the search box?

    The expected behavior is to put focus on the page (compare pressing Esc after Ctrl+f). Interestingly all browsers break with that expected behavior, hopefully for good reason, which means the expected behavior would logically be not to override that default. But note that Gmail for example does in fact do so.

  18. Inverle commented on Nov 16, 2025

    @Inverle
    Member

    Press Escape followed by Ctrl+Z (twice) and then Ctrl+Y

    What this does:

    bug.mp4
  19. Frenzie commented on Nov 16, 2025

    @Frenzie
    Member

    What this does:

    For me it additionally switched to another tab btw, but I haven't been able to reproduce that so I'm wondering if maybe I accidentally pressed something else as well.

    Edit: never mind, Vivaldi does return focus to the page as expected, and Ctrl+Z on the page reopens the previously closed tab.

  20. added theissue type on Jul 4, 2026
  21. added this to the 1.30.0 milestone on Jul 4, 2026
  22. added
    Good first issue 1️⃣
    on Jul 4, 2026
  23. self-assigned this
    on Jul 4, 2026
  24. modified the milestones: 1.30.0, 1.31.0 on Sep 8, 2026
  25. removed their assignment
    on Oct 20, 2026
  26. removed this from the 1.31.0 milestone on Oct 20, 2026
  27. added a commit that references this issue on Nov 1, 2026
    9e87fcf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature RequestGood first issue 1️⃣Shortcuts ⌨

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions