-
If I use the browsers autocomplete function I can delete a suggestion by highlighting an entry and hitting delete. Is it possible to mimic this behavior with autoComplete.js, e.g. by a call-back to the web server via Ajax? The keyDown event fires regardless if the pull-down menu is shown or not... |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
Yes, that is possible. The pulldown menu can contain whatever HTML you want, so you can add a dedicated button per row to delete it, and you can also listen for the Or you can use the Then you store the item ID, listen for the delete key in |
Beta Was this translation helpful? Give feedback.
-
Thanks for the fast answer. It seems that I can't listen to the I added a listener to the configuration as shown below. I get a response on the console for
Thanks |
Beta Was this translation helpful? Give feedback.
-
I thought so as well... But I only see the This is a Firefox screenshot from the console. You can see:
I tried putting the log command into "events: list: navigate" , and I tried adding it "manually" to the input field - no luck. It should work but I'm obviously missing something. |
Beta Was this translation helpful? Give feedback.
-
Thanks you again for your insight... I had a look at the source code of autoComplete.js ... and it's not a bug, it's just not a feature. It seems that the If I move the selection with my mouse the color change is only due to the CSS attribute When I click on an item, the mouse click generates an event that autoComplete.js is listening to. It gets the appropriate item and reports it back. So, unfortunately the answer to my question is: no. |
Beta Was this translation helpful? Give feedback.
Thanks you again for your insight...
I had a look at the source code of autoComplete.js ... and it's not a bug, it's just not a feature.
It seems that the
navigate
event is only triggered if the "cursor" is moved with the up- and down arrow keys (something that I wasn't able to do either). The application is listening for keydown events, processes them and in turn generates thenavigate
event.If I move the selection with my mouse the color change is only due to the CSS attribute
hover
. The application itself is unaware of these changes and can't report them. This would involve monitoring the mouse movement and I haven't found any indication that autoComplete.js is doing that.When I click…