Skip to content

Input: apply blurred styles when the field isn't focused#779

Open
c-tonneslan wants to merge 1 commit into
charmbracelet:mainfrom
c-tonneslan:fix/input-apply-blurred-styles
Open

Input: apply blurred styles when the field isn't focused#779
c-tonneslan wants to merge 1 commit into
charmbracelet:mainfrom
c-tonneslan:fix/input-apply-blurred-styles

Conversation

@c-tonneslan
Copy link
Copy Markdown

Closes #770.

Input.View only ever writes to st.Focused, so themes that customise Blurred.TextInput stop taking effect once the field loses focus. v1 used to branch on focus state and the sibling Text.View still does. Mirror that pattern.

Closes charmbracelet#770.

The v1 Input.View applied user styles to whichever side (focused or
blurred) matched the current state. The v2 port only ever wrote to
st.Focused, so themes that customised Blurred.TextInput stopped taking
effect once the field lost focus. Mirror field_text.go's pattern.

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

V2 Regression: Blurred styles no longer apply on input fields

1 participant