<?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: dbl-click event for feature layer not firing in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dbl-click-event-for-feature-layer-not-firing/m-p/71364#M6363</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sarah.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI, I came to the same issue. Now after clicking like a fool when trying to get the point, I realize that the graphic is triggering dbl-click event when you move mouse between two clicks of double click for a few pixels.&lt;/P&gt;&lt;P&gt;When you double click the same pixel without move, graphic catches 2 clicks, but after small move, it catches dbl-click.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And another specific behaviour for me on Linux. If I double click graphic in Chrome, the graphic triggers two click events, but map triggers dbl-click event. If I double click graphic in Firefox, the graphic triggers two click and the map also. In Firefox the lower layer will not get dbl-click event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know this will not help you, but IMHO it is good to know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And maybe it's good to add this information into bug description so they will be able to find solution sooner.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Mar 2015 13:44:59 GMT</pubDate>
    <dc:creator>MatúšVandák</dc:creator>
    <dc:date>2015-03-03T13:44:59Z</dc:date>
    <item>
      <title>dbl-click event for feature layer not firing</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dbl-click-event-for-feature-layer-not-firing/m-p/71355#M6354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to zoom the map on a double-click even if I am double clicking a feature layer...but the map won't zoom. When I try to listen for 'dbl-click' on the feature layer, it doesn't even print to the console:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;featureLayer.on("dbl-click", function(evt) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("dbl-click");
});


&amp;nbsp; console.log('hi');


});&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone replicate this? I have a label layer and if I double click over the text it zooms the map and seems the event is fired for the label layer...as soon as I double click on the graphic of a feature layer, no response.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:45:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dbl-click-event-for-feature-layer-not-firing/m-p/71355#M6354</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-10T22:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: dbl-click event for feature layer not firing</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dbl-click-event-for-feature-layer-not-firing/m-p/71356#M6355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sarah,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you be able to post more of you code?&amp;nbsp; I was unable to reproduce this.&amp;nbsp; Here is a &lt;A href="http://jsfiddle.net/6wrz6qf7/"&gt;JS Fiddle&lt;/A&gt; of the code I used.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2015 14:23:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dbl-click-event-for-feature-layer-not-firing/m-p/71356#M6355</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2015-01-26T14:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: dbl-click event for feature layer not firing</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dbl-click-event-for-feature-layer-not-firing/m-p/71357#M6356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code is a bit convoluted because I am using dojo classes to implement a dgrid table. I updated the JS Fiddle in a tiny way to confirm one thing: when the layer is double-clicked it captures that event, but also two 'click' events. &lt;A href="http://jsfiddle.net/6wrz6qf7/1/" title="http://jsfiddle.net/6wrz6qf7/1/"&gt;Edit fiddle - JSFiddle&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a feature layer 'click' event that calls my dgrid class and selects the row in the dgrid for the graphic that was clicked on the map. When I try to implement a double-click event with this in place, the double-click never registers. I have a feeling it is because the double-click is actually firing the click event first, which goes through a query to select the feature....and perhaps it is getting lost in the deferred query object?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to replicate this issue in this sample in the sandbox: &lt;A href="https://developers.arcgis.com/javascript/jssamples/fl_dgrid.html" title="https://developers.arcgis.com/javascript/jssamples/fl_dgrid.html"&gt;dgrid | ArcGIS API for JavaScript&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2015 17:21:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dbl-click-event-for-feature-layer-not-firing/m-p/71357#M6356</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-01-26T17:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: dbl-click event for feature layer not firing</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dbl-click-event-for-feature-layer-not-firing/m-p/71358#M6357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if this will help, but you could add an 'if' statement to see if the feature is already selected.&amp;nbsp; If it is, you could then zoom to it on a second click.&amp;nbsp; Or, if you were to double-click from the start, it will highlight and zoom to the feature all at once.&amp;nbsp; In the sample you referenced, you would update the 'selectGrid' function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;function selectGrid(e) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(id){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(e.graphic.attributes.OBJECTID == id){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.setExtent(e.graphic.geometry.getExtent());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; id = e.graphic.attributes.OBJECTID;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // select the feature that was clicked
&amp;nbsp;&amp;nbsp;&amp;nbsp; var query = new Query();
&amp;nbsp;&amp;nbsp;&amp;nbsp; query.objectIds = [id];
&amp;nbsp;&amp;nbsp;&amp;nbsp; var states = map.getLayer("states");
&amp;nbsp;&amp;nbsp;&amp;nbsp; states.selectFeatures(query, FeatureLayer.SELECTION_NEW);
&amp;nbsp;&amp;nbsp;&amp;nbsp; // select the corresponding row in the grid
&amp;nbsp;&amp;nbsp;&amp;nbsp; // and make sure it is in view
&amp;nbsp;&amp;nbsp;&amp;nbsp; grid.clearSelection();
&amp;nbsp;&amp;nbsp;&amp;nbsp; grid.select(id);
&amp;nbsp;&amp;nbsp;&amp;nbsp; grid.row(id).element.scrollIntoView();
}&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an updated &lt;A href="http://jsfiddle.net/6wrz6qf7/2/" rel="nofollow noopener noreferrer" target="_blank"&gt;JSFiddle&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:45:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dbl-click-event-for-feature-layer-not-firing/m-p/71358#M6357</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-10T22:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: dbl-click event for feature layer not firing</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dbl-click-event-for-feature-layer-not-firing/m-p/71359#M6358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the thought Jake...doesn't get to the heart of my problem. I want normal map zooming on dbl-click, and feature interactivity on single click, with the events completely isolated. There seems to be no way for me to capture the dbl-click event when it occurs on a feature layer-- checking if a feature is selected already does not get around the problem that a user may dbl-click elsewhere on the layer, not on the same feature. I also don't want to zoom to a feature, I want to zoom 1 map level...I could force that if I there was a way to know the user had double-clicked!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems like a serious issue to me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2015 18:08:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dbl-click-event-for-feature-layer-not-firing/m-p/71359#M6358</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-01-28T18:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: dbl-click event for feature layer not firing</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dbl-click-event-for-feature-layer-not-firing/m-p/71360#M6359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I worked through the esri's dgrid sample and the code in the &lt;SPAN class="pln" style="color: #000000;"&gt;selectGrid function dealing with the dgrid rows looks like it's causing your trouble. I can't see why off hand. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;I wrote a work-around and posted it here: &lt;A href="https://community.esri.com/docs/DOC-3141"&gt;dgridclick.html&lt;/A&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE:&amp;nbsp; Workout is using setTimeout as mentioned by &lt;A href="https://community.esri.com/migrated-users/41473"&gt;Sarah Clark&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 15:36:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dbl-click-event-for-feature-layer-not-firing/m-p/71360#M6359</guid>
      <dc:creator>JoshHevenor</dc:creator>
      <dc:date>2015-01-29T15:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: dbl-click event for feature layer not firing</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dbl-click-event-for-feature-layer-not-firing/m-p/71361#M6360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wrote a workaround using a setTimeout() function based on this JQuery example: &lt;A href="https://gist.github.com/ncr/399624" title="https://gist.github.com/ncr/399624"&gt;README&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks everyone.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 16:19:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dbl-click-event-for-feature-layer-not-firing/m-p/71361#M6360</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-01-29T16:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: dbl-click event for feature layer not firing</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dbl-click-event-for-feature-layer-not-firing/m-p/71362#M6361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh Josh, yours is cleaner &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt; This is what I came up with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var click;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
layer.on('click', function(evt) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // !!!! Check first if it's a dbl-click using time-out !!!!
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; click++;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (click == 1) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; setTimeout(function() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (click == 1) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; click = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // proceed&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dgrid.selectGrid(map, dgrid, evt, storeGraphics, symbols, exclude);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }, 300);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // dbl-click, clear the global
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; click = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:45:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dbl-click-event-for-feature-layer-not-firing/m-p/71362#M6361</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-10T22:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: dbl-click event for feature layer not firing</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dbl-click-event-for-feature-layer-not-firing/m-p/71363#M6362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FYI this bug is now logged with ESRI:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defect ID: BUG-000084944&lt;/P&gt;&lt;P&gt;Synopsis: When double-clicking on a feature layer that has a callback function, the dbl-click event does not fire and the click event fires twice. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2015 22:19:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dbl-click-event-for-feature-layer-not-firing/m-p/71363#M6362</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-02-02T22:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: dbl-click event for feature layer not firing</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dbl-click-event-for-feature-layer-not-firing/m-p/71364#M6363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sarah.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI, I came to the same issue. Now after clicking like a fool when trying to get the point, I realize that the graphic is triggering dbl-click event when you move mouse between two clicks of double click for a few pixels.&lt;/P&gt;&lt;P&gt;When you double click the same pixel without move, graphic catches 2 clicks, but after small move, it catches dbl-click.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And another specific behaviour for me on Linux. If I double click graphic in Chrome, the graphic triggers two click events, but map triggers dbl-click event. If I double click graphic in Firefox, the graphic triggers two click and the map also. In Firefox the lower layer will not get dbl-click event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know this will not help you, but IMHO it is good to know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And maybe it's good to add this information into bug description so they will be able to find solution sooner.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2015 13:44:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dbl-click-event-for-feature-layer-not-firing/m-p/71364#M6363</guid>
      <dc:creator>MatúšVandák</dc:creator>
      <dc:date>2015-03-03T13:44:59Z</dc:date>
    </item>
  </channel>
</rss>

