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

Fix #1879: Input focus() should not scroll unless autoFocus=true #2787

Merged
merged 7 commits into from
Jul 6, 2022

Conversation

melloware
Copy link
Member

@melloware melloware commented Apr 22, 2022

###Defect Fixes
Fix #1879: Input focus() should not scroll unless autoFocus=true

Reusable utility DomHandler.focus() to allow controlling whether to scroll when focusing or not. Default is to NOT scroll but can be overridden like in cases of `autoFocus

This also will NOT call focus() again if the element already has focus document.activeElement !== inputRef.current

@melloware melloware requested a review from mertsincan April 22, 2022 12:33
@melloware melloware added the Status: Pending Review Issue or pull request is being reviewed by Core Team label Apr 22, 2022
@mertsincan mertsincan added Status: Discussion Issue or pull request needs to be discussed by Core Team and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels May 9, 2022
@mertsincan mertsincan merged commit 41b4279 into primefaces:master Jul 6, 2022
@melloware melloware deleted the PR1879 branch July 6, 2022 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Discussion Issue or pull request needs to be discussed by Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Checkbox/Radio: Do not scroll page on click
2 participants