Primeng: AutoDisplay mode to menubar

Created on 3 Apr 2017  路  8Comments  路  Source: primefaces/primeng

I'm submitting a ... (check one with "x")

[ ] bug report => Search github for a similar issue or PR before submitting
[ x] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior
Current behavior to display options for the primary menu item is to hover over that item.

Expected behavior
The request is to have the option of controlling this behavior through hover or click actions.

What is the motivation / use case for changing the behavior?
User population expects sub-menu to display using a click action (i.e. mouse) rather than a mouse hover over.

Please tell us about your environment:

  • Angular version: 2.4.10

  • PrimeNG version: 2.0.5

  • Browser: [all ]

  • Language: [all | TypeScript X.X | ES6/7 | ES5]

new feature

Most helpful comment

@Merve7 Not only this does not resolves problems presented in linked issues (Namely menubar is unusable on android as noted in #2931 ) but it does not fully fix this issue as well - as AutoDisplay mode wil switch the behaviour on the first level, but second and any subsequent levels will still work on hover.

All 8 comments

Would be a great feature, I麓m looking forward to have it asap, very useful.

There is a old fork with that feature, "autoDisplay" :
https://github.com/mcwebdev/ngprime/blob/master/app/components/vendor/primeng/menubar/menubar.ts

And hover is useless on mobiles.
It's impossible to display the subitems with them.

We have autoDisplay mode in PrimeFaces which does exactly the same, adding this as an enhancement. By the way, mobile browsers like iOS execute hover on click.

I only tested it on Android Chrome and Chrome dev tools, it's interresting to know for the iOS behaviour thank you !

Any traction on this? It appears to have been removed from 4.1.1.

I'm still having this issue on android using PrimeNG 5.2.0 in an application generated by Celerio Angular Quickstart (https://github.com/jaxio/celerio-angular-quickstart/tree/master/quickstart). The usage of the menubar is very basic so I wouldn't expect the way in which the application is generated to have anything to do with the problem.

@Merve7 Not only this does not resolves problems presented in linked issues (Namely menubar is unusable on android as noted in #2931 ) but it does not fully fix this issue as well - as AutoDisplay mode wil switch the behaviour on the first level, but second and any subsequent levels will still work on hover.

This happens on PrimeNG 7.0.0 as well. Otherwise I need to detect device whether mobile or desktop to toggle AudoDisplay value. Any update on that?

Was this page helpful?
0 / 5 - 0 ratings