menu icon indicating copy to clipboard operation
menu copied to clipboard

Touch Support

Open blacktemplar opened this issue 8 years ago • 6 comments

I am using your menu component for a web application which is used on desktops but also on mobile devices. But for devices which only have touch support the menu handling is very counter intuitive und buggy.

One bug would be that sometimes some Submenu-Items are not clickable or they don't open the Submenu. This always happens if a props-change triggers the addition of a new Submenu in which case this Submenu cannot be opened until either another menu item was opened or clicked or you click somewhere else on the menu (I think this is a focus problem).

Furthermore if a submenu is opened it is very buggy and hard to close it again without clicking another menu item and for some browser / mobile versions (I had the problem with an iOS device) its not possible at all (so one submenu must always be open which blocks the main view).

Also in this context it would be good to close a submenu if a menu item got clicked (see #65).

I understand that this component does not focus on touch devices but still will there be an improvement for this devices in near future, or should I use another menu component for touch devices?

blacktemplar avatar Feb 07 '17 16:02 blacktemplar

We haven't use rc-menu in mobile devices. If you want it to support touch events, you can create a PR, thanks.

benjycui avatar Apr 19 '17 01:04 benjycui

Hi @blacktemplar are u find a solution?

victorpavlenko avatar Aug 16 '17 23:08 victorpavlenko

I actually was in need of this too, would love to see it happen!

sabarasaba avatar Aug 17 '17 07:08 sabarasaba

Not really, it is usable with touch devices but has a lot of bugs (especially on IPhone). I tried to fix some of them by setting some options, but its still very buggy.

blacktemplar avatar Aug 17 '17 15:08 blacktemplar

We don't use this in mobile web, and we are short of hands. But PR is welcomed, thanks.

benjycui avatar Aug 18 '17 01:08 benjycui

Hi everyone, I figured out a way to bypass by installing the rc-tab-event-plugin, replacing <MenuItem> with <li className="rc-menu-time" onTouchTap={function}> and handle the rc-menu-item-selected class manually with the onTouchTap function by handling the selected keys manually.

sunlee-newyork avatar Oct 20 '17 05:10 sunlee-newyork