EasyUI Forum
May 13, 2024, 06:59:18 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: SubMenu pop to left?  (Read 5696 times)
chrwei
Full Member
***
Posts: 219


View Profile Email
« 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?
Logged
chrwei
Full Member
***
Posts: 219


View Profile Email
« Reply #1 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...
Logged
jarry
Administrator
Hero Member
*****
Posts: 2264


View Profile Email
« Reply #2 on: August 29, 2019, 01:31:07 AM »

Please try to update to the newest version.
Logged
chrwei
Full Member
***
Posts: 219


View Profile Email
« Reply #3 on: August 29, 2019, 06:10:33 AM »

perfect!
Logged
chrwei
Full Member
***
Posts: 219


View Profile Email
« Reply #4 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.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!