shbatm / MMM-OnScreenMenu

MagicMirror² utility module that provides a simple on screen menu for control
MIT License
62 stars 22 forks source link

Cant close the menu on an official 7 inch touchscreen #13

Closed CobreDev closed 5 years ago

CobreDev commented 5 years ago

I can open the menu up and select stuff, but when I tap the close button, nothing happens. I can use it just fine if I plug a mouse into the pi.

My Hardware:

Edit: When I move the mouse, it pops up, not when I click it. When I stop moving the mouse, it goes away after a little while.

Edit 2: If I turn touchscreen mode off, then I can close it by tapping the close button, then tapping off of the menu.

CobreDev commented 5 years ago

So touchMode: true, or touchMode: false, doesn't really work well with a touchscreen

shbatm commented 5 years ago

Touchmode just changes if the labels are displayed or just appear on hover over. To close the menu on a touch screen try just touching somewhere off the menu.

shbatm commented 5 years ago

Closing due to inactivity.

Legion2 commented 4 years ago

I have the same problem. To close the menu, two touch actions are required. First press the close button and then touch somewhere else, so the button loose the :hover state. The hover state does not really work on touch devices, because it's sticky and don't go away when you stop touching the button.

Would it be possible to disable the hover effect?

shbatm commented 4 years ago

Try the develop branch and then try commenting out these two lines with # and see if that improves anything. Not in a place I can test anything right now, sorry!

Legion2 commented 4 years ago

@shbatm Commenting out these two line would completely break the menu html. I instead created a PR #19 which improves the touchscreen behavior, by removing the use of the :hover css selector and instead use the javascript callbacks.

shbatm commented 4 years ago

Sorry, been I while since I looked at that code and replied too quick--I really meant just commenting out the 2nd line to knock out the mouseover callbacks. I'll take a look at your PR when I get a chance, thanks for making the changes.