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

autoFocus causing popover style to scroll browser to top #5

Open
daweimau opened this issue Jan 12, 2022 · 2 comments
Open

autoFocus causing popover style to scroll browser to top #5

daweimau opened this issue Jan 12, 2022 · 2 comments

Comments

@daweimau
Copy link

It seems this commit introduced a bug related to the autoFocus attribute

When an Editable:

  • is a textField type, and
  • uses mode="popover",

the first time the editable link is clicked, the browser screen will scroll to top. Subsequent opens of the same Editable popover won't do this.

This doesn't happen in version 0.5.1.

When we remove autoFocus from the Input element, this behaviour stops. But generally autoFocus is desirable, so it would be better to understand and cure this behaviour if possible.

It is definitely the autoFocus attribute. Other field types (which don't have autoFocus) are not affected (and they become affected by introducing autoFocus).

Can't figure out the rest, which sucks for me.

@daweimau
Copy link
Author

Seems to be an instance of this behaviour:
react-bootstrap/react-bootstrap#2614

@YassienW
Copy link
Owner

Will be looking into this during the weekend

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

2 participants