Esri / solutions-components

A collection of UI components for constructing webapps.
Apache License 2.0
10 stars 4 forks source link

Hitting Enter key submits the comment/report #654

Closed skrishn closed 1 week ago

skrishn commented 1 month ago

Describe the bug

When the enter key is hit in the comment/popup form, it submits the comment or adds the report. Also, if I hit the enter key to add a line break in the comment, it submits the comment rather than allowing me to submit the line break in the field. This is best seen in a multiline text editing field.

Expected Behavior

Hitting Enter key, should take us to the submit comment button or report button

Reproduction Steps & Sample

https://localgovdev.mapsdevext.arcgis.com/apps/instant/reporter/index.html?appid=5d67655f728647ca8c141f17a54134d5

Other Relevant Info

No response

sumitzarkar commented 1 month ago

@skrishn

This is the default behavior of the Editor widget, which validates the input and will submit the form if there are no errors. If you have any required fields or any of the values entered are not valid, it will focus on that field.

chris-fox commented 1 month ago

@sumitzarkar, this doesn't happen in the map viewer using the Editor widget. Use the map below and open the Comments table, from the table click the create record button, this will bring up the Editor widget. Click in the comments field and enter some text and then hit enter, focus stays in the box and a line break is added.

https://devext.arcgis.com/apps/mapviewer/index.html?webmap=f6a949ada5f94be797b6a730d945ba32

sumitzarkar commented 1 month ago

@chris-fox

Correct this is working correctly in Mapviewer, we will check this in Reporter and keep you updated with our findings

sumitzarkar commented 1 month ago

@chris-fox , @skrishn