Automattic / _s

Hi. I'm a starter theme called _s, or underscores, if you like. I'm a theme meant for hacking so don't use me as a Parent Theme. Instead try turning me into the next, most awesome, WordPress theme out there. That's what I'm here for.
http://underscores.me/
GNU General Public License v2.0
10.94k stars 3.12k forks source link

LI "focus" class is not removed on ontouchstart #1356

Closed tomanatura closed 4 years ago

tomanatura commented 5 years ago

Hello, "focus" class is added to LI element if I touch it, but if I touch it again (to close sub menu) 'focus' class is not removed. Is it intentional function, or bug? If it is not bug, can anyone help me to fix that? Thanks you

Ismail-elkorchi commented 4 years ago

Hi @tomanatura ! I just tested a new version of _s and I can't replicate the problem that you describe. What are the steps to follow to reproduce this behavior?

tomanatura commented 4 years ago

Hi @Ismail-elkorchi Thanks you for your reply. I've checked it out _(with new _s)_ and it has the same behavior. Steps: 1) Add menu with submenu item. 2) If you click on li.menu-item-has-children = 'focus' class is added. 3) If you click again on li.menu-item-has-children (because you want to close submenu) = 'focus' class is not removed. 'Focus' class is removed only after you click outside of menu, that is OK behaviour (I would keep it), but make it completely OK solution - from my perspective - would be ability to remove 'focus' class by click on li.menu-item-has-children too.

But maybe... am I doing something wrong? Thanks you

Ismail-elkorchi commented 4 years ago

Ahh ! Now I see what you mean. In fact, this behavior is correct. We don't want to remove the focus class since we have to keep the focus on the last touched menu item regardless of its state.

Thanks @tomanatura for the update.