rivo / tview

Terminal UI library with rich, interactive widgets — written in Golang
MIT License
11.11k stars 576 forks source link

Form input items are hijacking autocomplete dropdown selection #1048

Closed albertywu closed 2 weeks ago

albertywu commented 3 weeks ago

I'm running into an issue where when an autocomplete dropdown item overlaps with another form field input item, the form input item takes click precedence and "hijacks" the click. See example below:

autocomplete

^ Example adapted from the autocomplete demo here

Is there a way to specify that the autocomplete dropdown items have higher "zIndex" than other items in the form so this doesn't happen? If not, what is the recommended approach for handling this scenario?

rivo commented 2 weeks ago

This was a bug. The latest commit should fix this.

albertywu commented 2 weeks ago

Thanks for the super fast response @rivo. Unfortunately commit 8808192 didn't fix the issue. I don't think it's about when the autocomplete gets rendered (it's getting rendered fine). The issue is that mouse-clicking on an autocomplete item that overlaps with a form field doesn't work because the form field steals the click (see original gif).