I am trying to manually open a popup when clicking on the map view, but the click events do not seem to be working quite as I am expecting. It seems almost like my popup is getting closed before I can even see it.
This is my code:
let viewElement = document.getElementById("map-component");
await viewElement.viewOnReady();
let view = viewElement.view;
view.on("click", (event)=>{
view.openPopup({
location: event.mapPoint,
title: "You clicked here",
content: "This is a point of interest"
});
});With immediate-click I do briefly see the popup and then it closes automatically. Using the hold and double-click events, the popup does display and stays visible. How do I get the popup to stay visible using a simple click event?