Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[popups] Select inputs on focus #1523

Open
vladmoroz opened this issue Mar 2, 2025 · 2 comments
Open

[popups] Select inputs on focus #1523

vladmoroz opened this issue Mar 2, 2025 · 2 comments
Assignees
Labels
has workaround new feature New feature or request

Comments

@vladmoroz
Copy link
Contributor

Migrating Paper from Radix to Base UI, I expected that input contents would be selected when popups are opened:

Radix Popover:

Screen.Recording.2025-03-02.at.17.46.30.mov

Base UI Popover:

Screen.Recording.2025-03-02.at.17.46.48.mov

As another example, native dialogs do the same:

Screen.Recording.2025-03-02.at.17.52.35.mov
@vladmoroz vladmoroz added status: waiting for maintainer These issues haven't been looked at yet by a maintainer new feature New feature or request labels Mar 2, 2025
@atomiks atomiks added has workaround and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Mar 3, 2025
@atomiks
Copy link
Contributor

atomiks commented Mar 3, 2025

Workaround for now can be to manually select it with a ref inside a rAF upon open (to avoid scroll page jump, once the popup is positioned):

requestAnimationFrame(() => {
  inputRef.current.select();
});

@colmtuite
Copy link
Contributor

Working on this @vladmoroz. Thanks 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has workaround new feature New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

4 participants