SubMenu display problems

Hi, I have a submenu display problem.

if I create 1 level menus in a webtoolbar everything is ok, but if I create a submenu of a menu (therefore a second level menu) a horizontal scrollbar is shown which does not allow clicking on the submenu, does anyone know how to fix it?

Do you have a sample and screenshot?

yes , this is the code that i have add to xojo sample projet

// Create the Dates menu
Var dateMenu As New WebMenuItem(“menu”)

Var m1 As New WebMenuItem(“menu1”)
dateMenu.AddMenuItem(m1)
Var m2 As New WebMenuItem(“sub menu of menu1”)
m1.AddMenuItem(m2)

dateMenu.AddMenuItem(New WebMenuItem(“Today”))

dateMenu.AddMenuItem(New WebMenuItem(“Tomorrow”))
dateMenu.AddMenuItem(New WebMenuItem(“Next Week”))
dateMenu.AddMenuItem(New WebMenuItem(“Next Month”))

// Assign the menu to the dates button
Var dateButton As New WebToolbarButton
dateButton.Style = WebToolbarButton.ButtonStyles.Menu
dateButton.Menu = dateMenu
dateButton.Caption = “Dates”
datebutton.Icon = webpicture.BootstrapIcon(“calendar-date”)

Me.AddItem(dateButton)

screenshot

There is a bug, for some reason overflow: auto is used here:
image

As a workaround, you can try using this in App HTMLHeader:

<style>
.dropdown-menu {overflow:inherit !important;}
</style>

With that code it works:
ezgif.com-gif-maker (26)

Can you open an Issue?

Note: I don’t know if this code will break something

2 Likes

https://tracker.xojo.com/xojoinc/xojo/-/issues/71533

This has been reported and fixed already in the 2023r1 branch:

Thank you for your time opening the cases. I’ve seen Robin already closed them, as they aren’t reproducible anymore in the next version.

2 Likes