You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building a custom plugin with autosuggestField.
With JS I would like to register when a user clicks one of the suggestions and when the inputfield is being filled in with the new value. Since there is no built in way to listen to this type of event I have created a global click event on the document.
But to my surprise this gets triggered everywhere in the document including the input field but not the suggestions which are basically list items.
I would like to do this because I want to prefill other fields with additional information related to the chosen suggestion of the autosuggestField.
Steps to reproduce
Use autosuggestField in a custom plugin
Try to trigger a JS event to know what suggestion has been chosen
Expected behavior
I would like to at least know when a user clicks one of the suggestions.
Actual behavior
Nothing happens.
The event is not being triggered.
I assume it is being blocked by internal functions.
Craft CMS version
4.8.3
PHP version
8.1
Operating system and version
MacOS sonoma
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered:
What happened?
Description
I'm building a custom plugin with autosuggestField.
With JS I would like to register when a user clicks one of the suggestions and when the inputfield is being filled in with the new value. Since there is no built in way to listen to this type of event I have created a global click event on the document.
But to my surprise this gets triggered everywhere in the document including the input field but not the suggestions which are basically list items.
I would like to do this because I want to prefill other fields with additional information related to the chosen suggestion of the autosuggestField.
Steps to reproduce
Expected behavior
I would like to at least know when a user clicks one of the suggestions.
Actual behavior
Nothing happens.
The event is not being triggered.
I assume it is being blocked by internal functions.
Craft CMS version
4.8.3
PHP version
8.1
Operating system and version
MacOS sonoma
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: