Skip to content

refactor: use key with fallback to keyCode for compatibility#1394

Merged
underoot merged 3 commits intomapbox:mainfrom
erotourtes:refactor/key-code-deprecation
May 5, 2025
Merged

refactor: use key with fallback to keyCode for compatibility#1394
underoot merged 3 commits intomapbox:mainfrom
erotourtes:refactor/key-code-deprecation

Conversation

@erotourtes
Copy link
Contributor

The keyCode property is deprecated and may, or may not be supported in modern browsers

This PR updates functions to check for key property and fallback to keyCode for compatibility with older browsers that don't support the key property.

@erotourtes erotourtes requested a review from a team as a code owner April 26, 2025 08:16
Copy link
Member

@underoot underoot left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! Left some comments, overall looks good!

Copy link
Contributor Author

@erotourtes erotourtes left a comment

Choose a reason for hiding this comment

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

Thank you for taking the time to review this!

@erotourtes erotourtes requested a review from underoot May 2, 2025 17:34
@underoot underoot merged commit 223f47f into mapbox:main May 5, 2025
2 checks passed
@underoot underoot mentioned this pull request Nov 3, 2025
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.

2 participants