laptop and a wrench

Bug

Subsequent clicks on sketches in ArcGIS JavaScript API 4.x do not register the clicks using the MapView click event.

Last Published: December 3, 2021 ArcGIS API for JavaScript
Bug ID Number BUG-000144549
SubmittedNovember 16, 2021
Last ModifiedJune 5, 2024
Applies toArcGIS API for JavaScript
Version found4.21
Operating SystemWindows OS
Operating System Version10.0
StatusAs Designed

Additional Information

The Sketch widget is updated and calls to stop propagation internally. This prevents subsequent click events from firing, which results in the view click events not registering after clicking on a graphic. It is recommended to use the immediate-click event to access the view click event information while actively using Sketch.

Workaround

Use 'immediate-click' instead of 'click' on the view. For example: view.on("immediate-click", () => { view.hitTest(event).then((response) => { console.log(response); }); })

Steps to Reproduce

Bug ID: BUG-000144549

Software:

  • ArcGIS API for JavaScript

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options