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

Focus method for all Input Components #4694

Closed
MarkPerryBV opened this issue Dec 20, 2017 · 3 comments
Closed

Focus method for all Input Components #4694

MarkPerryBV opened this issue Dec 20, 2017 · 3 comments

Comments

@MarkPerryBV
Copy link

There is no guarantee in receiving a response in GitHub Issue Tracker, If you'd like to secure our response, you may consider PrimeNG PRO Support where support is provided within 4 business hours

I'm submitting a ... (check one with "x")

[ ] bug report => Search github for a similar issue or PR before submitting
[x] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

We are making extensive use of all the input components from PrimeNG.

Our UX person has just asked that we "focus" the first form field in forms when they appear on screen.
Since the actual input element is hidden away within the PrimeNG component template we can't actually access it to fire the .focus() methods on the native DOM Element. Also the PrimeNG components don't offer an "export" that allows us access to the DOM element either.

I would like it if each input component exposed a "focus()" method so I can focus certain controls when I need to.

@cagataycivici cagataycivici added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Mar 26, 2018
@veksen
Copy link

veksen commented Apr 25, 2019

Pretty important for UX - is there any workaround?

@veksen
Copy link

veksen commented Apr 30, 2019

Ended up rewriting our own Autocomplete component because the original does not properly autofocus nor doesn't support programmatically focus on the input.

@cetincakiroglu cetincakiroglu removed the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Aug 9, 2022
@cetincakiroglu
Copy link
Contributor

Hi,

Since this problem occurs across many components, I'm closing this issue and merging them into one #11807. We'll fix them altogether.

Thanks for your support and report!

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

No branches or pull requests

4 participants