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

Highlight on mobile click

Open Garett-MacGowan opened this issue 2 years ago • 4 comments

Version 2.5.0

Steps to Reproduce

When users interact with the menu on mobile devices, the burger is highlighted during the transition.

Reproduceable on the example site: https://hamburger-react.netlify.app/

Note

This may or may not be expected, but it would be nice to have the option to turn it off. I recognize most click events on mobile are associated with this behavior.

Workaround

My temporary (tested only on chrome) workaround using style jsx:

<div className='burger-container' onClick={props.onClick}>
    <Spiral size={28} label='menu' easing="ease-out" hideOutline={true}/>
</div>
<style jsx>{`
  .burger-container:first-child {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
`}</style>

webkit, moz, ms, and user-select statements taken from this stack overflow.

Garett-MacGowan avatar Oct 02 '22 05:10 Garett-MacGowan

Thanks for reporting.

I indeed decided not to turn this off by default since it's expected on click, but I agree it would be helpful to make it more easy to turn off.

In version 3.0 you will be able to simply forward style and className, for now this would be simplest:

.hamburger-react { -webkit-touch-callout: … }

luukdv avatar Oct 02 '22 07:10 luukdv

hello, thanks for the pkg it's great

any eta for the v3 release ? thanks !

fffan64 avatar Jan 29 '23 01:01 fffan64

No ETA yet! Working on it in the v3 branch whenever I can, but I've been short on time. I'll let you know when it's ready to test.

luukdv avatar Jan 29 '23 07:01 luukdv

Update about v3.0: Looking for new owner

luukdv avatar Jun 27 '23 07:06 luukdv