<?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: 4.21 SketchViewModel bug for click-based tools in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-21-sketchviewmodel-bug-for-click-based-tools/m-p/1115803#M75238</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/6522"&gt;@JoelBennett&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you for reporting this. You are correct, this is a bug caused by some changes in version 4.21. Apologies for this, we are looking into this now, and hope to get this addressed in 4.22.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jose&lt;/P&gt;</description>
    <pubDate>Wed, 10 Nov 2021 19:53:56 GMT</pubDate>
    <dc:creator>JoseBanuelos</dc:creator>
    <dc:date>2021-11-10T19:53:56Z</dc:date>
    <item>
      <title>4.21 SketchViewModel bug for click-based tools</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-21-sketchviewmodel-bug-for-click-based-tools/m-p/1114995#M75198</link>
      <description>&lt;P&gt;New to the 4.21 ArcGIS API for JavaScript is a bug that occurs when using click-based tools in the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html" target="_self"&gt;SketchViewModel&lt;/A&gt; module.&amp;nbsp; In particular, it occurs whenever the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#create" target="_self"&gt;create&lt;/A&gt; method is called with createOptions.mode being set to "click", regardless of geometry type.&amp;nbsp; The problem itself is that a click from any mouse button is treated the same as a left-click.&lt;/P&gt;&lt;P&gt;This can be seen in the sample "&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/widgets-editor-basic/" target="_self"&gt;Edit features with the Editor widget&lt;/A&gt;".&amp;nbsp; Select any feature type to create, and you can place or draw the feature the same way by using any mouse button.&amp;nbsp; If you use the &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=widgets-editor-basic" target="_self"&gt;sandbox&lt;/A&gt; to change the version to 4.20, only left-clicks are used to place or draw as one would expect.&lt;/P&gt;&lt;P&gt;This is not a problem for all workflows, but is for some.&amp;nbsp; For example, in one workflow, the create tool is repeatedly activated after each feature is created, so the user can continue creating features without manually clicking to activate every time.&amp;nbsp; At any time, the user may want to right-click an existing feature in the same or different layer, and choose from various actions in a right-click menu.&amp;nbsp; However, in 4.21, the right-click no longer results in a context menu being shown, but a new feature being unexpectedly created.&lt;/P&gt;&lt;P&gt;If you have a locally hosted copy of the API, my recommended workaround is to make the following change in the&amp;nbsp;esri/views/draw/DrawOperation module:&lt;/P&gt;&lt;P&gt;Search for:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;f._onImmediateClick=function(a){&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Replace with:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;f._onImmediateClick=function(a){if(a.button!==0)return;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 19:06:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-21-sketchviewmodel-bug-for-click-based-tools/m-p/1114995#M75198</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2021-11-08T19:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: 4.21 SketchViewModel bug for click-based tools</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-21-sketchviewmodel-bug-for-click-based-tools/m-p/1115803#M75238</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/6522"&gt;@JoelBennett&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you for reporting this. You are correct, this is a bug caused by some changes in version 4.21. Apologies for this, we are looking into this now, and hope to get this addressed in 4.22.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jose&lt;/P&gt;</description>
      <pubDate>Wed, 10 Nov 2021 19:53:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-21-sketchviewmodel-bug-for-click-based-tools/m-p/1115803#M75238</guid>
      <dc:creator>JoseBanuelos</dc:creator>
      <dc:date>2021-11-10T19:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: 4.21 SketchViewModel bug for click-based tools</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-21-sketchviewmodel-bug-for-click-based-tools/m-p/1128439#M75662</link>
      <description>&lt;P&gt;I've found this to be fixed in 4.22...thank you&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 20:18:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-21-sketchviewmodel-bug-for-click-based-tools/m-p/1128439#M75662</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2021-12-22T20:18:47Z</dc:date>
    </item>
  </channel>
</rss>

