<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cannot get click event to fire in EB mobile device mode in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-get-click-event-to-fire-in-eb-mobile-device/m-p/1698349#M88388</link>
    <description>&lt;P&gt;Yes, I am having a LOT of trouble getting the correct map widget id because no matter what map I have loaded, I seem to only be able to retrieve the id for the desktop version. I finally got it by using the 'onViewsCreate' property in the JimuMapViewComponent and still had to hard code the 'useMapWidgetId' property. As for point 2, so far I haven't had an issue manipulating the DOM element for the label, but I will take a another look. I assume I should be using a className or 'active' indicator instead and I did try that first, but found it to be a little tricky, but will keep trying.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Apr 2026 19:14:22 GMT</pubDate>
    <dc:creator>FranklinAlexander</dc:creator>
    <dc:date>2026-04-24T19:14:22Z</dc:date>
    <item>
      <title>Cannot get click event to fire in EB mobile device mode</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-get-click-event-to-fire-in-eb-mobile-device/m-p/1698246#M88385</link>
      <description>&lt;P&gt;I am working on a custom widget for an EB Developer application and the on 'click' event won't fire when in mobile layout, but fires as expected in Desktop and Table layout. Each layout does have it's own map and I do have access to the map view in each case, so I don't think that is the issue. Also, nothing is blocking the map in mobile layout (verified in the Page outline) and I have popups enabled for the map.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;jimuMapView.view.whenLayerView(cLayer).then((layerView) =&amp;gt; {
 let highlight
 const mapDiv = document.getElementById("jimu-widget-a11y-widget_47")
 console.log("jimu map view ", jimuMapView) //this is defined 
 jimuMapView.view.on("click", function(evt) { 
  console.log("click zoom level ", jimuMapView.view.zoom)          
  let screenPoint = {
    x: evt.x,
    y: evt.y
  }          
  jimuMapView.view.hitTest(screenPoint, {include[cLayer]})
    .then(function(resp) {   
      console.log("Hello!")        
      const graphHits = resp.results?.filter(
       (hitResult) =&amp;gt; hitResult.type === "graphic"
      );
      if(graphHits?.length &amp;gt; 0) {
        const county = graphHits[0].graphic.attributes.COUNTY
        if(county &amp;amp;&amp;amp; currCounty !== county) {             
          if (jimuMapView.view.zoom &amp;gt;= 6 &amp;amp;&amp;amp; jimuMapView.view.zoom &amp;lt; 8.5) { 
            highlight &amp;amp;&amp;amp; highlight.remove();
            highlight = layerView.highlight(graphHits[0].graphic); 
            hoverCty.current = county  
            hoverGraph.current = graphHits[0].graphic          
            showLabel(county, screenPoint, mapDiv)
            } else {
              if(mapDiv.hasChildNodes() &amp;amp;&amp;amp; mapDiv.childNodes.length &amp;gt; 1) {
                mapDiv.removeChild(mapDiv.childNodes[1])
              }
            }
            hoverCty.current = county          
          }              
         } else {
           if(mapDiv.hasChildNodes() &amp;amp;&amp;amp; mapDiv.childNodes.length &amp;gt; 1) {
             mapDiv.removeChild(mapDiv.childNodes[1])
             hoverCty.current = ""
         }
         highlight &amp;amp;&amp;amp; highlight.remove();
       }
    })
  })
})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2026 13:55:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-get-click-event-to-fire-in-eb-mobile-device/m-p/1698246#M88385</guid>
      <dc:creator>FranklinAlexander</dc:creator>
      <dc:date>2026-04-24T13:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get click event to fire in EB mobile device mode</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-get-click-event-to-fire-in-eb-mobile-device/m-p/1698259#M88386</link>
      <description>&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#hitTest" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#hitTest&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Try directly passing the ClickEvent, evt, into hitTest().&lt;/P&gt;&lt;P&gt;I don't think it's the cause of your problem, but I think you may have some issues with the way you are getting and altering the Map DOM node.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;You say you have multiple Map Widgets, each one will have a different widget_id number.&amp;nbsp;&lt;OL class="lia-list-style-type-lower-alpha"&gt;&lt;LI&gt;Actually, this might have something to do with your problem. Are you sure that you are putting the click event listener on the correct map? A map from a different screen size could still be defined in memory, but not accessible to the user.&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;You are attempting to delete a DOM node through direct DOM manipulation. This will likely not work and the node will reappear after every re-render.&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Fri, 24 Apr 2026 14:26:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-get-click-event-to-fire-in-eb-mobile-device/m-p/1698259#M88386</guid>
      <dc:creator>JeffreyThompson2</dc:creator>
      <dc:date>2026-04-24T14:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get click event to fire in EB mobile device mode</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-get-click-event-to-fire-in-eb-mobile-device/m-p/1698349#M88388</link>
      <description>&lt;P&gt;Yes, I am having a LOT of trouble getting the correct map widget id because no matter what map I have loaded, I seem to only be able to retrieve the id for the desktop version. I finally got it by using the 'onViewsCreate' property in the JimuMapViewComponent and still had to hard code the 'useMapWidgetId' property. As for point 2, so far I haven't had an issue manipulating the DOM element for the label, but I will take a another look. I assume I should be using a className or 'active' indicator instead and I did try that first, but found it to be a little tricky, but will keep trying.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2026 19:14:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-get-click-event-to-fire-in-eb-mobile-device/m-p/1698349#M88388</guid>
      <dc:creator>FranklinAlexander</dc:creator>
      <dc:date>2026-04-24T19:14:22Z</dc:date>
    </item>
  </channel>
</rss>

