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

Bug: Page scroll on clicking a RadioButton in a long RadioButtonGroup #2016

Closed
mpriour opened this issue Apr 22, 2021 · 2 comments
Closed

Bug: Page scroll on clicking a RadioButton in a long RadioButtonGroup #2016

mpriour opened this issue Apr 22, 2021 · 2 comments
Assignees
Labels
1 - assigned Issues that are assigned to a sprint and a team member. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. good first issue Issues that can be worked on by contributors new to calcite-components.

Comments

@mpriour
Copy link
Member

mpriour commented Apr 22, 2021

Summary

When you have a RadioButtonGroup that is longer than the screen height, clicking on a CalciteRadioButton scrolls the page to the top.
I've isolated the cause to https://github.com/Esri/calcite-components/blob/master/src/components/calcite-radio-button/calcite-radio-button.tsx#L263. this.focused = true causes a focus() call for the underlying input element and the page scrolls.

Actual Behavior

Page scrolls to the top

Expected Behavior

Page should maintain its position

Reproduction Steps

Created a simplified reproduction case on CodeSandbox
live app: https://j12l8.csb.app/
codesandbox link: https://codesandbox.io/s/cold-worker-j12l8?file=/src/index.js

Scroll down and click on a radio button that is "below the fold" and you see the page scroll to the top.

Relevant Info

Tested on Chrome, Safari, and Firefox. Seeing same behavior across browsers and platforms.

@mpriour mpriour added 0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. labels Apr 22, 2021
@benelan benelan added the needs triage Planning workflow - pending design/dev review. label Sep 27, 2021
@jcfranco jcfranco added this to the Sprint 10/11 – 10/22 milestone Oct 8, 2021
@jcfranco jcfranco added good first issue Issues that can be worked on by contributors new to calcite-components. and removed needs triage Planning workflow - pending design/dev review. labels Oct 8, 2021
@y0n4 y0n4 self-assigned this Oct 11, 2021
@y0n4 y0n4 added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Oct 11, 2021
@y0n4
Copy link
Contributor

y0n4 commented Oct 13, 2021

It seems like this issue has been fixed in #3161.
This fix is installed and available in the latest version 1.0.0-beta.67

@jcfranco
Copy link
Member

Closing as a duplicate of #3146.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - assigned Issues that are assigned to a sprint and a team member. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. good first issue Issues that can be worked on by contributors new to calcite-components.
Projects
None yet
Development

No branches or pull requests

4 participants