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

Detect textbox focus #4817

Closed
1 task done
arian81 opened this issue Jul 6, 2023 · 4 comments · Fixed by #5005
Closed
1 task done

Detect textbox focus #4817

arian81 opened this issue Jul 6, 2023 · 4 comments · Fixed by #5005
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@arian81
Copy link
Contributor

arian81 commented Jul 6, 2023

  • I have searched to see if a similar issue already exists.

Is your feature request related to a problem? Please describe.
I need to detect when a user clicks in the textbox field.

Describe the solution you'd like
create a new event trigger for textboxes that shows when the user has clicked to type in the textbox.

Additional context
This is a very common trigger in JavaScript applications and I'm very surprised it doesn't already exist in gradio.

@abidlabs
Copy link
Member

abidlabs commented Jul 6, 2023

Yep seems reasonable to me to add a .focus() event to gr.Textbox() and gr.Number(). PRs are welcome

@abidlabs abidlabs added enhancement New feature or request good first issue Good for newcomers labels Jul 6, 2023
@abidlabs abidlabs added this to the Component Cleanup milestone Jul 9, 2023
@JodyZ0203
Copy link
Contributor

Would it be possible for me to work on this? If so, I would like to pick this one up. Thanks!

@abidlabs
Copy link
Member

Hi @JodyZ0203 yes thanks! We're happy to review your PR

@JodyZ0203
Copy link
Contributor

Hi @abidlabs, I have created a PR that adds the focus event. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants