EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 13, 2024, 06:59:18 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for React
>
SubMenu pop to left?
Pages: [
1
]
« previous
next »
Print
Author
Topic: SubMenu pop to left? (Read 5696 times)
chrwei
Full Member
Posts: 219
SubMenu pop to left?
«
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
Re: SubMenu pop to left?
«
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
Re: SubMenu pop to left?
«
Reply #2 on:
August 29, 2019, 01:31:07 AM »
Please try to update to the newest version.
Logged
chrwei
Full Member
Posts: 219
Re: SubMenu pop to left?
«
Reply #3 on:
August 29, 2019, 06:10:33 AM »
perfect!
Logged
chrwei
Full Member
Posts: 219
Re: SubMenu pop to left?
«
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
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...