Drawer only opening when inspecting

Hi, I have a coded component with some code in the Script:

...
function openGeofence() {
    appfarm.actions.newGeofence();
}

document.querySelector('.leaflet-draw-draw-polygon').addEventListener('click', function() {
    openGeofence();
});

The Appfarm action is simple:

The issue
In normal dev
When not having “inspect” open the action runs, but the drawer does not open

In dev when having inspect open
It opens fine.

I am struggling understanding what is wrong, because the action runs, but nothing opens.

Update

The window appears on smaller screens (not responsive), that is why it shows when the inspect is open. Is there any way we can use come standard CSS class to prevent it to be hidden or with custom JS to stop re-size.

I believe it is related to whether the drawer is responsive or persistent, and the width of the drawer? @ErikAKSkallevold

Hi,

For responsive drawers:

  • If the viewport is large, a persistent drawer will be used.
  • If the viewport is small, a temporary drawer will be used.

Since you’re experiencing this issue with persistent drawers and responsive drawers when the screen is large, I think your issue has something to do with the persistent drawer not being able to expand enough.

Can you post a screenshot of the drawer settings? That will make it easier to debug what is happening :smile:

// Erik

I will reply in DM :smile: