-
Notifications
You must be signed in to change notification settings - Fork 44
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
Quick Reblog: Add keyboard navigation #917
base: master
Are you sure you want to change the base?
Quick Reblog: Add keyboard navigation #917
Conversation
event.stopPropagation(); | ||
|
||
if (enableKeyNav) { | ||
if (event.key === 'Enter' && event.ctrlKey) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency on Macs, this should probably include metaKey
as an alternative!
event.stopPropagation(); | ||
|
||
if (enableKeyNav) { | ||
if (event.key === 'Enter' && event.ctrlKey) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (event.key === 'Enter' && event.ctrlKey) { | |
if (event.key === 'Enter' && (event.ctrlKey || event.metaKey)) { |
}, | ||
"enableKeyNav": { | ||
"type": "checkbox", | ||
"label": "Enable keyboard navigation", | ||
"default": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the need to make this a preference. Let's just build it in.
Description
Addresses #899.
While the popup's comment input or tag input are focused, this adds Ctrl + Enter to reblog and Escape to close the popup.
Demonstration
Ctrl + Enter to reblog in comment input field:
Ctrl + Enter to reblog in tag input field:
Escape to close the popup while either comment or tag field are focused:
Testing steps
Check the option in Quick Reblog's preferences and use Ctrl + Enter while either tag or input field are focused.