merge: Fix ctrl+enter post form shortcut skipping plugin confirm dialogs (!1249)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/1249 Closes #1209 Approved-by: Hazelnoot <acomputerdog@gmail.com> Approved-by: dakkar <dakkar@thenautilus.net>
This commit is contained in:
commit
855ad39e04
1 changed files with 4 additions and 1 deletions
|
|
@ -676,7 +676,10 @@ function clear() {
|
|||
}
|
||||
|
||||
function onKeydown(ev: KeyboardEvent) {
|
||||
if (ev.key === 'Enter' && (ev.ctrlKey || ev.metaKey) && canPost.value) post();
|
||||
if (ev.key === 'Enter' && (ev.ctrlKey || ev.metaKey) && canPost.value) {
|
||||
ev.preventDefault();
|
||||
post();
|
||||
}
|
||||
|
||||
// justEndedComposition.value is for Safari, which keyDown occurs after compositionend.
|
||||
// ev.isComposing is for another browsers.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue