Web 2.0 Hamberger Menu Problem

The Hamburger menu of web 2.0 toolbar looks great on the page! However, if you open the hamburger on any mobile, you cannot dismiss the brought up menu by clicking or tapping in the background. I’ve used setfocus in web 1.0 but don’t want a round trip hack.

works the same, if you are reducing the size of your browser on desktop as much until the Hamburger icon appears. I think it is currently by design, as there is no special canva click event, which could trigger any dismiss routine. Only workaround:

Click, touch the Hamburg button again.

Feedback case to fix this:
<https://xojo.com/issue/61595>

You can put these two methods in a global module to fix the issue!

Public Sub Collapse(extends control as WebToolbar)
  dim js as string = "jQuery('#"+control.ControlID+"_navbarSupportedContent').collapse('hide');"
  control.ExecuteJavaScript(js)
End Sub

Public Sub Expand(extends control as WebToolbar)
  dim js as string = "jQuery('#"+control.ControlID+"_navbarSupportedContent').collapse('show');"
  control.ExecuteJavaScript(js)
End Sub
3 Likes

already implemented! Merci!!

I don’t quite follow, What is a global module? Where does this code go? Thank you!

Drag a “Module” over from the Inspector’s Library on the Right side of the IDE (Name it). Then put @Brock_Nash’s methods on this new module.

1 Like