Skip to content

Highlight on mobile click #59

Open
@Garett-MacGowan

Description

@Garett-MacGowan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions