Skip to content

Emit input value on blur for input components#281

Merged
devmount merged 4 commits into
mainfrom
bugs/279-emit-input-value-on-blur
May 13, 2026
Merged

Emit input value on blur for input components#281
devmount merged 4 commits into
mainfrom
bugs/279-emit-input-value-on-blur

Conversation

@devmount
Copy link
Copy Markdown
Collaborator

@devmount devmount commented May 12, 2026

What changed?

This change emits/forwards the blur event when blurring a TextInput, TextArea or SelectInput component.

Why?

Convenience. This makes the current input value available when listening for the blur event.

Limitations and Notes

The SelectInput tests currently miss cases for events. I was too stupid (or too tired) to make it work for now.

Applicable Issues

Closes #279

Screenshots

None

@devmount devmount self-assigned this May 12, 2026
Copy link
Copy Markdown
Member

@MelissaAutumn MelissaAutumn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should send the current event instead. I'm afraid that if we start changing default event params we may shoot ourselves in the foot later when we copy and paste code for a native html element. 🤔

Copy link
Copy Markdown
Contributor

@davinotdavid davinotdavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the work so far and sorry for the bad issue description 😅!

I agree with @MelissaAutumn here. I ran into this while working on something else in thunderbird-accounts where I only needed the value but there might be cases where the whole event would be needed!

@devmount
Copy link
Copy Markdown
Collaborator Author

Good thinking, thanks for the suggestion. I changed it to emit the actual event, I agree this is much better!

Copy link
Copy Markdown
Contributor

@davinotdavid davinotdavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! thank you very much!

@devmount devmount merged commit 7290fc5 into main May 13, 2026
3 checks passed
@devmount devmount deleted the bugs/279-emit-input-value-on-blur branch May 13, 2026 15:22
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.

TextInput doesn't forward the input value onBlur

3 participants