<?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: Measure Widget 2.15 for Web App Builder - Issue with ESC key press in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/measure-widget-2-15-for-web-app-builder-issue-with/m-p/1252809#M14865</link>
    <description>&lt;P&gt;I was able to fix this by adding a 'keydown' bind event in the postCreate function.&amp;nbsp; I could only get it to work by binding it to the document.body.&amp;nbsp; Added a conditional to stop the propagation of the 'ESC' if measure.Type is set and to also exit editing if editing is enabled.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;this.own(on(document.body, "keydown", lang.hitch(this, function(evt) {
  if(evt.keyCode == keys.ESCAPE) {
    if(this.measureType) {
      event.stop(evt);
    } else if (this.editingEnabled) {
      this.editToolbar.deactivate();
      this.editingEnabled = false;
    }
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Jan 2023 11:34:23 GMT</pubDate>
    <dc:creator>LanceCole</dc:creator>
    <dc:date>2023-01-30T11:34:23Z</dc:date>
    <item>
      <title>Measure Widget 2.15 for Web App Builder - Issue with ESC key press</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/measure-widget-2-15-for-web-app-builder-issue-with/m-p/1250882#M14864</link>
      <description>&lt;P&gt;First, Thanks,&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/6438"&gt;@TomSellsted&lt;/a&gt;,&amp;nbsp;for a great widget.&amp;nbsp; I have found it very helpful.&lt;/P&gt;&lt;P&gt;I did note a minor issue that I am unsure how to clean up.&amp;nbsp; If you draw a multipart polygon or line and press 'ESC' to quit the sketch, the line or polygon is removed, but the labels remain.&amp;nbsp; Also, the widget remains in draw mode, and behavior is erratic if you continue to use the widget.&lt;/P&gt;&lt;P&gt;How can the widget be modified to remove the active text symbols and cleanly terminate the current sketch?&lt;/P&gt;&lt;P&gt;Sketching:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LanceCole_0-1674578257214.png" style="width: 722px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/61073i584F47F6DEA30889/image-dimensions/722x420?v=v2" width="722" height="420" role="button" title="LanceCole_0-1674578257214.png" alt="LanceCole_0-1674578257214.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After pressing 'ESC', labels remain&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LanceCole_1-1674578376634.png" style="width: 722px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/61075iE40E6A0360DEBE2C/image-dimensions/722x415?v=v2" width="722" height="415" role="button" title="LanceCole_1-1674578376634.png" alt="LanceCole_1-1674578376634.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Behavior after:&amp;nbsp; Cannot see the first segment until the second click and only the last label is displayed upon completion.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LanceCole_0-1674580134259.png" style="width: 718px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/61086i37A77A23F5F3344E/image-dimensions/718x402?v=v2" width="718" height="402" role="button" title="LanceCole_0-1674580134259.png" alt="LanceCole_0-1674580134259.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 11:22:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/measure-widget-2-15-for-web-app-builder-issue-with/m-p/1250882#M14864</guid>
      <dc:creator>LanceCole</dc:creator>
      <dc:date>2023-01-30T11:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Widget 2.15 for Web App Builder - Issue with ESC key press</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/measure-widget-2-15-for-web-app-builder-issue-with/m-p/1252809#M14865</link>
      <description>&lt;P&gt;I was able to fix this by adding a 'keydown' bind event in the postCreate function.&amp;nbsp; I could only get it to work by binding it to the document.body.&amp;nbsp; Added a conditional to stop the propagation of the 'ESC' if measure.Type is set and to also exit editing if editing is enabled.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;this.own(on(document.body, "keydown", lang.hitch(this, function(evt) {
  if(evt.keyCode == keys.ESCAPE) {
    if(this.measureType) {
      event.stop(evt);
    } else if (this.editingEnabled) {
      this.editToolbar.deactivate();
      this.editingEnabled = false;
    }
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 11:34:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/measure-widget-2-15-for-web-app-builder-issue-with/m-p/1252809#M14865</guid>
      <dc:creator>LanceCole</dc:creator>
      <dc:date>2023-01-30T11:34:23Z</dc:date>
    </item>
  </channel>
</rss>

