[GH-ISSUE #1048] Form input items are hijacking autocomplete dropdown selection #757

Closed
opened 2026-03-04 01:07:32 +03:00 by kerem · 2 comments
Owner

Originally created by @albertywu on GitHub (Oct 30, 2024).
Original GitHub issue: https://github.com/rivo/tview/issues/1048

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?

Originally created by @albertywu on GitHub (Oct 30, 2024). Original GitHub issue: https://github.com/rivo/tview/issues/1048 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](https://github.com/user-attachments/assets/5d7312ef-9d39-4f12-8764-6df4a85a1e95) ^ Example adapted from the autocomplete demo [here](https://github.com/rivo/tview/blob/master/demos/inputfield/autocomplete/main.go) 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?
kerem closed this issue 2026-03-04 01:07:32 +03:00
Author
Owner

@rivo commented on GitHub (Nov 3, 2024):

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

<!-- gh-comment-id:2453499671 --> @rivo commented on GitHub (Nov 3, 2024): This was a bug. The latest commit should fix this.
Author
Owner

@albertywu commented on GitHub (Nov 4, 2024):

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).

<!-- gh-comment-id:2455464001 --> @albertywu commented on GitHub (Nov 4, 2024): Thanks for the super fast response @rivo. Unfortunately commit [8808192](https://github.com/rivo/tview/commit/8708192e562a88fa11610c174915d12740d97fe8) 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).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#757
No description provided.