Add capturing event listeners to the KeyboardShortcut library#3555
Merged
Add capturing event listeners to the KeyboardShortcut library#3555
Conversation
Contributor
|
|
Member
|
Not sure at the time but it could have side effects. Like when we want to stop propagation for all listeners. capturing will fail this scenario. |
marcaaron
approved these changes
Jun 11, 2021
github-actions bot
pushed a commit
that referenced
this pull request
Jun 11, 2021
Add capturing event listeners to the KeyboardShortcut library (cherry picked from commit 584183f)
This was referenced Jun 11, 2021
Contributor
|
🚀 Cherry-picked to staging in version: 1.0.68-2🚀
|
Contributor
|
🚀 Deployed to production in version: 1.0.68-4🚀
|
Contributor
|
🚀 Deployed to staging in version: 1.0.68-5🚀
|
Contributor
|
🚀 Deployed to production in version: 1.0.73-3🚀
|
This was referenced Jun 25, 2021
This was referenced Jul 7, 2021
95 tasks
89 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Shoutout to @HorusGoul for figuring this out. In the slack thread you made it sound like we should always have capturing event listeners, unless we specifically want to enable bubbling for certain events. I wasn't sure of the potential side-effects of preventing event bubbling by default, so I opted for the minimum change that resolves the current issue. Feel free to follow-up with any thoughts regarding other events which should not bubble.
Details
TBH I'm not 100% clear on why this fixes the linked issue, but shoutout to @HorusGoul for finding this! It works! 🎉
Fixed Issues
Fixes #3512
Tests / QA Steps (Web/Desktop only)
ReportActionComposeis focused, hitCMD+K.Escand the chat switcher should hide.Tested On
Screenshots
Web
Mobile Web
n/a
Desktop
iOS
n/a
Android
n/a