XF 2.0 XF JS Autocomplete Event

Lukas W.

Well-known member
Is there a javascript event that is fired upon clicking on a xenforo autocomplete suggestion? I'm currently running on change keyup paste, but that does not catch it, and I couldn't find a clue in xfs core.js. It seems XF.AutoCompleteResults.insertResult() does not fire any event.
 
The result object is lower level -- you want the specific handler that's in use. See XF.Autocomplete in core/form.js. It triggers auto-complete:insert on the input.
 
See XF.Autocomplete in core/form.js. It triggers auto-complete:insert on the input.

Didn't expect that there, when the other one is directly in the core.js. Your JS splitting can be confusing sometimes. :D auto-complete:insert worked, thanks a lot!
 
Back
Top Bottom