[GH-ISSUE #1061] Cannot tell when dropdown has focus or not #768

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

Originally created by @polothy on GitHub (Dec 13, 2024).
Original GitHub issue: https://github.com/rivo/tview/issues/1061

Reproduction

Old behavior

git checkout -b test b0a7293b8130
cd demos/form
go run .

Observe that when the focus is on the dropdown, it is white in color.

Screenshot 2024-12-13 at 2 36 58 PM

New behavior

# Get latest version
git checkout master
cd demos/form
go run .

Observe that when the focus is on the dropdown, the color does not change, it's blue.

Screenshot 2024-12-13 at 2 37 21 PM

Commit that changed behavior

github.com/rivo/tview@a64fc48d76 (I think)

If I revert this while on the master branch, and run demos/form, then the old behavior is restored.

Workaround

I haven't been able to figure out a workaround or way to restore the old behavior. If the new behavior is here to stay, I would appreciate a tip on how to get the color to change on focus in my own program.

As always, thank you very much for your time and wonderful project.

Originally created by @polothy on GitHub (Dec 13, 2024). Original GitHub issue: https://github.com/rivo/tview/issues/1061 # Reproduction ## Old behavior ```shell git checkout -b test b0a7293b8130 cd demos/form go run . ``` Observe that when the focus is on the dropdown, it is white in color. ![Screenshot 2024-12-13 at 2 36 58 PM](https://github.com/user-attachments/assets/1bc2c0b0-9abe-4807-9ddb-286a41b55a7f) ## New behavior ```shell # Get latest version git checkout master cd demos/form go run . ``` Observe that when the focus is on the dropdown, the color does not change, it's blue. ![Screenshot 2024-12-13 at 2 37 21 PM](https://github.com/user-attachments/assets/f1d51c8e-7967-4d7b-9410-b78d1d40b526) # Commit that changed behavior https://github.com/rivo/tview/commit/a64fc48d7654432f71922c8b908280cdb525805c (I think) If I revert this while on the `master` branch, and run `demos/form`, then the old behavior is restored. # Workaround I haven't been able to figure out a workaround or way to restore the old behavior. If the new behavior is here to stay, I would appreciate a tip on how to get the color to change on focus in my own program. As always, thank you very much for your time and wonderful project.
kerem closed this issue 2026-03-04 01:07:35 +03:00
Author
Owner

@justmeandopensource commented on GitHub (Feb 12, 2025):

@rivo
I am facing exact same issue after updating to the latest master branch. Prior to this I was in commit dated 26th Aug 2023 and this behaviour wasn't there. Looking forward to any resolution on this please.

And thanks for all your effort in maintaining this repo.

<!-- gh-comment-id:2654781576 --> @justmeandopensource commented on GitHub (Feb 12, 2025): @rivo I am facing exact same issue after updating to the latest master branch. Prior to this I was in commit dated 26th Aug 2023 and this behaviour wasn't there. Looking forward to any resolution on this please. And thanks for all your effort in maintaining this repo.
Author
Owner

@rivo commented on GitHub (Feb 16, 2025):

Related to #1029, I think. I will look into this.

<!-- gh-comment-id:2661454129 --> @rivo commented on GitHub (Feb 16, 2025): Related to #1029, I think. I will look into this.
Author
Owner

@rivo commented on GitHub (Mar 25, 2025):

The latest commit is a rewrite of the DropDown component. Mainly, it now uses an InputField to process text input (including copy/pasting and the control keys that come with it). It also fixes various other issues, including the one described in this issue.

<!-- gh-comment-id:2752033203 --> @rivo commented on GitHub (Mar 25, 2025): The latest commit is a rewrite of the `DropDown` component. Mainly, it now uses an `InputField` to process text input (including copy/pasting and the control keys that come with it). It also fixes various other issues, including the one described in this issue.
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#768
No description provided.