material icon indicating copy to clipboard operation
material copied to clipboard

Overlapping cascading menu items

Open chrisconover opened this issue 11 years ago • 8 comments

I'm attempting to create a cascading dropdown menu using , , , and . As the user hovers over options, the menus overlap on each other.

screen shot 2015-10-12 at 1 30 40 pm

Screen recording: https://drive.google.com/a/google.com/file/d/0B7VTbsvs9COJRnVCNWZKNjhKd28/view

Example: http://codepen.io/chrisconover/pen/wKqpKg

chrisconover avatar Oct 12 '15 20:10 chrisconover

Per this image in the spec, this is the intended behavior:

spec image

I'd recommend setting the width attribute to make them not stack so perfectly.

rschmukler avatar Oct 13 '15 15:10 rschmukler

The spec image shows a menu item selected and its child selected which reveals more options. I agree, that image looks fine.

If you look at my example, you'll notice child menus of "Foo" and "Bar" (siblings) overlap each other. This is not working as intended. When a user hovers off of a menu selection any of its submenus should close. In my example above, I hover off of "Foo" and onto "Bar", but the child menu of "Foo" doesn't close.

chrisconover avatar Oct 13 '15 21:10 chrisconover

Any thoughts @rschmukler?

chrisconover avatar Oct 14 '15 17:10 chrisconover

@rschmukler i'm seeing this also, Foo and Bar gets both selected and opened.

EladBezalel avatar Oct 14 '15 18:10 EladBezalel

Ah sorry, I mis-read the issue. Will take a look

rschmukler avatar Oct 14 '15 19:10 rschmukler

Thanks @rschmukler. Any thoughts? Happy to do a video call/screen share if it would help clarify things.

chrisconover avatar Oct 16 '15 17:10 chrisconover

we have the same issue .. the main thing seems to be that the sub menus dont really open on hover as on the demo site and they also dont close when moving on ... thus the sub menus stay open and overlap

PS: there is a piece of code in the menus controllers where the hover event is checked and in that there is an menuContainer[0].contains(el[0]) check which is always false for us. we will look some more into this next week

matthiasg avatar Oct 23 '15 13:10 matthiasg

Looking into this now. @chrisconover one thing I notice is the use of mouseover and mouseleave - those are unnecessary with md-menu-bar and likely are causing some of the problems. Here is one with ng-click instead. The issue still persists, but it's closer to proper behavior. Hope to have a fix in today.

rschmukler avatar Nov 04 '15 22:11 rschmukler