Skip to content

Commit

Permalink
Comment popup: Use Ctrl+Enter shortcut to save and close
Browse files Browse the repository at this point in the history
Signed-off-by: Méven Car <meven.car@collabora.com>
Change-Id: I8da6e1208b0cbba6b51da97c6926d29da19a47a4
  • Loading branch information
meven authored and vmiklos committed Nov 6, 2024
1 parent bc54d5d commit dce4671
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions browser/src/canvas/sections/CommentSection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,13 @@ export class Comment extends CanvasSectionObject {
}

private textAreaKeyDown (ev: any): void {
if (ev && ev.ctrlKey && ev.key === "Enter") {
ev.preventDefault();
this.map.mention.closeMentionPopup(false);
this.onSaveComment(ev);
return;
}

this.handleKeyDownForPopup(ev, 'mentionPopup');
}

Expand Down

0 comments on commit dce4671

Please sign in to comment.