yuku / textcomplete

Autocomplete for HTMLTextAreaElement and more.
https://yuku.takahashi.coffee/textcomplete/
MIT License
1.74k stars 306 forks source link

Click to complete #359

Open lifeisfakenews opened 9 months ago

lifeisfakenews commented 9 months ago

Would be a nice addition if users could click on options in the completion list to complete them, as well as tab and enter and arrow keys to select

It makes sense - i naturally go to click on the items as you can with other completion inputs on other sites

yuku commented 9 months ago

Hi, thanks for the comment. I think you can complete by clicking the dropdown. If it doesn't work in your app, I think you are missing something 🤔

https://github.com/yuku/textcomplete/assets/96157/36dc92fb-b675-4d3b-8a3b-023c8dd7bb85

fabianeichfeldt commented 9 months ago

I have currently same problem: I am doing a migration of my frontend from Vue/Vuetify 2 to Vue 3 and have also problem with no click handling.

In vue2 it works still fine, but Vue3 seems to block the click event.

lifeisfakenews commented 9 months ago

I'm using astro and the contenteditable version of it with some other code to inline preview markdown stuff When i click on an item in the list, the list disappears but the text isn't filled into the box? not sure if this is an issue with the contenteditable package or my other logic i can try and test it without other input handlers at some point

Victorious3 commented 4 months ago

This happens on the demo page as well, so I don't think its any custom logic. It's specific to the contenteditable version. Would like to see this fixed as well.