BootStrap Hamburger Menu Control - Reloads Form?


#1

People - Just went through a major app revision where I am utilizing the BootStrap Hamburger control. It seems that when clicking the Hamburger that the current form re-loads prior to the menu appearing. Beside the issue of slowing down the application some functionality is lost. For instance clicking an item on a grid, and then the menu: If the menu item needs to know what grid row is clicked, it won’t because the grid seems to have reloaded and the item is no longer selected. Does anybody know if this is expected behavior or is there a setting on the Hamburger that leaves the current form in the state it is in when you click on the menu?

Thanks!


#2

It looks like the reload of the page is a behavior of the control. Here is a obvious work around:
Create a Global Variable:

Dim gHamburgerClicked = "N"

Add This Event to the Hamburger :

Function Hamburger1_onmousedown()
  'console.log("Mouse Down")
  gHamburgerClicked = "Y"
End Function

Put a conditional in the frm_onshow function that checks the variable and resets it if it is = “Y”:

frmSample_onshow
if gHamburgerClicked <> "Y" then
.
.
On show Code
.
.
Else
gHamburgerClicked = "N"
End if

#3

Yes, it does reload the form.


#4

Correction to the Above.: don’t set the Flag to ‘N’ in the onshow; use the frm_onhide for expected results