Title: SubMenu pop to left? Post by: chrwei on August 28, 2019, 02:15:44 PM I have a menu with a submenu that's on the right edge of the window, when the submenu pops out it goes to the right, creating a horizontal scroll bar, and it's only possible to even see the menu by using the keyboard arrow keys to scroll over. any way to make it pop to the left? or be "smart" and not pop outside the viewable area?
Title: Re: SubMenu pop to left? Post by: chrwei on August 28, 2019, 02:57:27 PM sorta tracked it down, "n = f.b.outerWidth(this.el)" is coming up zero in the alignMenu function, nothing there has an offsetWidth >0.
I think this is because the code is being run before the divs are actually rendered. getBoundingClientRect() and scrollWidth are also zero. not sure how to fix it... Title: Re: SubMenu pop to left? Post by: jarry on August 29, 2019, 01:31:07 AM Please try to update to the newest version.
Title: Re: SubMenu pop to left? Post by: chrwei on August 29, 2019, 06:10:33 AM perfect!
Title: Re: SubMenu pop to left? Post by: chrwei on August 29, 2019, 09:45:44 AM well, almost perfect...
I'd like to suggest an additional check: if the left side of the menu would end up off the left side of the screen, allow it to overlap the parent menu so it won't be off the screen. |