Skip to content

Emit click event on button enter or space keydown#245

Merged
bendera merged 2 commits intovscode-elements:mainfrom
MaxKless:button-enter-click
Jan 7, 2025
Merged

Emit click event on button enter or space keydown#245
bendera merged 2 commits intovscode-elements:mainfrom
MaxKless:button-enter-click

Conversation

@MaxKless
Copy link
Copy Markdown
Contributor

@MaxKless MaxKless commented Jan 7, 2025

fixes #242
@bendera here is the PR we discussed :)

@bendera
Copy link
Copy Markdown
Member

bendera commented Jan 7, 2025

Thanks! I love to see how the contributors' list grows. :)

How come it's a plain event and not a mouse (pointer?) event? I didn't write it to be argumentative, I just want to understand.

@MaxKless
Copy link
Copy Markdown
Contributor Author

MaxKless commented Jan 7, 2025

No reason... Event is just the base that I've always used in Lit and I'm not sure what the reasons or consequences of using MouseEvent would be. So idk :P I can update it if you want

@MaxKless
Copy link
Copy Markdown
Contributor Author

MaxKless commented Jan 7, 2025

I changed the event to be a MouseEvent because that's probably more in line with what consumers will be expecting.

@bendera bendera merged commit 3976c9e into vscode-elements:main Jan 7, 2025
@bendera
Copy link
Copy Markdown
Member

bendera commented Jan 7, 2025

Thanks!

I don't want to publish a new release yet, but I've published a pre-release version on npm. So you can use it if you'd like.

npm i @vscode-elements/elements@next

@MaxKless
Copy link
Copy Markdown
Contributor Author

MaxKless commented Jan 7, 2025

Awesome, I'll pull it down :) Thanks!

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.

vscode-button doesn't emit click events on pressing enter

2 participants