Skip to content

[Improvement]: Autofocus language search input when code block dropdown opens #9680

Description

@manavvp

Is there an existing issue for this?

  • I have searched the existing issues

Summary

When adding a code block to a work item, clicking the language selector opens a dropdown containing a search input. The input is not focused on search-bar, so typing does nothing until the user clicks into it. This asks for a second, precise click on a small target immediately after the first; the search input exists to be typed into, so focusing it on open makes the interaction a single click plus type.

Proposed behavior: Auto-focus the cursor onto the search bar. Escape and click-outside continue to close the dropdown and return focus to the editor.

Why should this be worked on?

The language listing is too long (and not alphabetically arranged) so scrolling feels impractical. The user would almost always want to search and press Enter to select. Auto-focusing on search maintains the flow.

This is the standard practice for searchable dropdowns, Notion's code block language picker does this too.

Metadata

Metadata

Assignees

Labels

Fields

Edition

None yet

Version

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions