Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix improve-shortcut-help #5348

Merged
merged 4 commits into from Feb 1, 2022
Merged

Fix improve-shortcut-help #5348

merged 4 commits into from Feb 1, 2022

Conversation

kidonng
Copy link
Member

@kidonng kidonng commented Jan 29, 2022

Test URLs

Here

Screenshot

Before After

@kidonng kidonng added the bug label Jan 29, 2022
@@ -51,7 +38,7 @@ function observeShortcutModal({key, target}: KeyboardEvent): void {
return;
}

const modal = select('body > details > details-dialog');
const modal = select('body > details:not(.js-command-palette-dialog) > details-dialog');
Copy link
Member Author

Choose a reason for hiding this comment

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

Without this it would match the command palette and stop working.

const observer = new MutationObserver(([{target}]) => {
if (target instanceof Element && !select.exists('.js-details-dialog-spinner', target)) {
improveShortcutHelp(target);
fixKeys(target);
Copy link
Member Author

@kidonng kidonng Jan 29, 2022

Choose a reason for hiding this comment

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

Fix #4962. The reason I "Can't replicate now" is that this feature stopped working completely as the command palette was added.

This was previously added in #1107 but it seems GitHub already separates the keys now. We just need to split ours.

@kidonng kidonng merged commit ecda2dd into main Feb 1, 2022
@kidonng kidonng deleted the fix-improve-shortcut-help branch February 1, 2022 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

2 participants