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

Remove hotkey functionality #51

Merged
merged 3 commits into from
Sep 15, 2021
Merged

Remove hotkey functionality #51

merged 3 commits into from
Sep 15, 2021

Conversation

koddsson
Copy link
Contributor

Operating hotkeys in a markdown toolbar is out of scope for this web component. Consumers of this component that would like hotkey functionality should rather use a hotkey library such as github/hotkey.

Adding data-hotkey="Meta+b" for the <md-bold> button should be the functional equivalent of the existing functionality and the same logic can be applied to the other buttons that have hotkeys enabled.

koddsson and others added 3 commits September 15, 2021 16:43
Co-authored-by: Kate Higa <khiga8@github.com>
Co-authored-by: Adrián Bolonio <bolonio85@gmail.com>
Co-authored-by: Kate Higa <khiga8@github.com>
Co-authored-by: Adrián Bolonio <bolonio85@gmail.com>
Co-authored-by: Kate Higa <khiga8@github.com>
Co-authored-by: Adrián Bolonio <bolonio85@gmail.com>
Copy link
Member

@keithamus keithamus left a comment

Choose a reason for hiding this comment

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

Very much agree with this change. Let's do "one thing well":tm:

Regardless, this will be a BREAKING change. Should be released as 2.0.0 (as of writing)

@koddsson koddsson marked this pull request as ready for review September 15, 2021 15:56
@koddsson koddsson requested a review from a team as a code owner September 15, 2021 15:56
@koddsson koddsson requested review from srt32 and dgreif September 15, 2021 15:56
@koddsson koddsson merged commit fa1ca22 into main Sep 15, 2021
@koddsson koddsson deleted the remove-hotkeys branch September 15, 2021 16:00
@davegaeddert
Copy link

In case others stumble across this like I did... I don't think that using https://github.com/github/hotkey is the same as how the hotkeys used to work in this component. Main reason being this issue (github/hotkey#28), which points out how @github/hotkey is actually disabled on textareas (among other things). @koddsson or @keithamus correct me if I'm wrong, but that sort of defeats the purpose as far as the markdown toolbar goes, because you can't actually use the hotkeys while you're in the textarea (can't highlight text and hit Meta+b OR just hit Meta+b by itself to start writing in bold...).

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.

3 participants