react-stepzilla icon indicating copy to clipboard operation
react-stepzilla copied to clipboard

Chrome Maintains focus on 'Next' and 'Previous' buttons, even if `preventEnterSubmission` is true

Open ericdcobb opened this issue 8 years ago • 1 comments

You can see this in the example app, there is a blue highlight around the next button after you click it to move to step two.

I think this is the expected behavior of chrome, the focus is kept on a button after it is clicked. It is confusing for users (they try to press enter and nothing happens).

I added a ref to a div in my step component and tried to manually set the focus to that in the componentDidMount function- but focus snaps back to the next clicked button. It would be nice if focus was blurred on the selected button between steps, or if there was a ref to the buttons that I could use to blur/set focus as I wanted.

ericdcobb avatar Jul 21 '17 23:07 ericdcobb

Sorry for the late reply. I would prefer to not do this in JavaScript and instead use CSS. Can you see if the CSS option here works for you https://stackoverflow.com/questions/19053181/how-to-remove-focus-around-buttons-on-click

newbreedofgeek avatar Aug 08 '17 22:08 newbreedofgeek