How to identify click event on text box

If you want to only trigger the event on clicking on the field in the modal, try to replace the selector:

input[data-fieldname="variation"][data-doctype="Shipping List"]

with:

.form-in-grid input[data-fieldname="variation"][data-doctype="Shipping List"]

After checking out all options here, the solution in this thread finally worked for me:

JavaScript Handler when clicking into a field

1 Like