r/javascript • • Aug 13 '14

Metro style context menu using JavaScript and CSS

http://blog.mandarbadve.com/2014/01/02/metro-style-context-menu-using-javascript-css/
0 Upvotes

5 comments sorted by

2

u/[deleted] Aug 13 '14

I wrote a popup menu like this before. It's not as easy as it sounds to get right.

For example: when submenus are involved, you want to display them immediately and then remove them as soon as the parent menu item isn't selected anymore right? Nope, you need to see if the user is moving their mouse towards the submenu and give them a chance to reach it, even if that takes their mouse over another menu item that should invoke a different submenu.

It may sound like a weird use case until you realize every major os works this way, then your own popup menu feels like it's harder to use

3

u/Plorntus Aug 13 '14

Yeah, it can get a bit tricky to get right. Anyone wanting to see how Amazon dealt with it can view it here: http://bjk5.com/post/44698559168/breaking-down-amazons-mega-dropdown

0

u/[deleted] Aug 13 '14

[deleted]

10

u/Plorntus Aug 13 '14

Sometimes it makes sense, for example web based applications where not having a proper context menu isn't user friendly. ie. Google Docs.

2

u/rossisdead Aug 13 '14

Luckily some browsers(Firefox at least) let you do shift + right click to get the native context menu.

0

u/yotamN Aug 13 '14

Soon you will be able to edit the regular context menu of the browser but in soon I mean year or two