<?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: Popup actions - Capture Close Event in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-actions-capture-close-event/m-p/263374#M24401</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! That's exactly what I was looking for &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Jun 2020 20:37:25 GMT</pubDate>
    <dc:creator>AndrewMurdoch1</dc:creator>
    <dc:date>2020-06-18T20:37:25Z</dc:date>
    <item>
      <title>Popup actions - Capture Close Event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-actions-capture-close-event/m-p/263372#M24399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anyway to capture the close event on the Popup?&amp;nbsp; It's great I can easily launch the Popup, but I want to know when the user closes it.&amp;nbsp;&amp;nbsp; Specifically this close button:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/497110_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2020 19:22:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-actions-capture-close-event/m-p/263372#M24399</guid>
      <dc:creator>AndrewMurdoch1</dc:creator>
      <dc:date>2020-06-18T19:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Popup actions - Capture Close Event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-actions-capture-close-event/m-p/263373#M24400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Andrew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;In 3.x you look for the popups hide event&lt;/P&gt;&lt;P&gt;&lt;A class="link-bare" href="https://developers.arcgis.com/javascript/3/jsapi/popup-amd.html#event-hide" title="https://developers.arcgis.com/javascript/3/jsapi/popup-amd.html#event-hide" rel="nofollow noopener noreferrer" target="_blank"&gt;https://developers.arcgis.com/javascript/3/jsapi/popup-amd.html#event-hide&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In 4.x&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;        watchUtils&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;whenTrue&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;popup&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'visible'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
          watchUtils&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;whenFalseOnce&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;popup&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'visible'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;info&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'popup has been closed'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
          &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:54:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-actions-capture-close-event/m-p/263373#M24400</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T12:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: Popup actions - Capture Close Event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-actions-capture-close-event/m-p/263374#M24401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! That's exactly what I was looking for &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2020 20:37:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-actions-capture-close-event/m-p/263374#M24401</guid>
      <dc:creator>AndrewMurdoch1</dc:creator>
      <dc:date>2020-06-18T20:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Popup actions - Capture Close Event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-actions-capture-close-event/m-p/1294863#M81285</link>
      <description>&lt;P&gt;In 4.25 I get this warning&lt;/P&gt;&lt;P&gt;[esri.core.watchUtils] &lt;span class="lia-unicode-emoji" title=":stop_sign:"&gt;🛑&lt;/span&gt; DEPRECATED - Module: esri/core/watchUtils&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":hammer_and_wrench:"&gt;🛠&lt;/span&gt;️ Replacement: esri/core/reactiveUtils&lt;BR /&gt;:gear:&lt;/img&gt;Version: 4.24&lt;/P&gt;&lt;P&gt;I have tried to use reactiveUtils but without success, the watchUtils example works ok. Here is the example that works and the other that I'm not able to get to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;//works!
watchUtils.whenTrue(view.popup,'visible', () =&amp;gt; {
	watchUtils.whenFalseOnce(view.popup,'visible', () =&amp;gt; {
	  console.info('popup has been closed');
	})
});
//doesn't work
reactiveUtils.whenOnce(() =&amp;gt; view.popup.visible).then(() =&amp;gt; {
	reactiveUtils.whenOnce(() =&amp;gt; !view.popup.visible).then(() =&amp;gt; {
	  console.info('how to get here?');
	})
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Made a new question for this problem:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-capture-close-event-in-4-2x/m-p/1295262#M81291" target="_blank"&gt;https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-capture-close-event-in-4-2x/m-p/1295262#M81291&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2023 05:18:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-actions-capture-close-event/m-p/1294863#M81285</guid>
      <dc:creator>PasiSavolainen</dc:creator>
      <dc:date>2023-06-02T05:18:36Z</dc:date>
    </item>
  </channel>
</rss>

