Skip to content

Commit

Permalink
Focus the editor when link dialog is closed.
Browse files Browse the repository at this point in the history
This is especially useful when the ESC key is hit. Without this, the
link dialog disappears, you expect to be able to continue editing, but
the editor does not have focus. Now it does!
  • Loading branch information
bjhess committed Nov 22, 2024
1 parent 5160d52 commit 4a95e51
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/exports/elements/tip-tap-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ export class TipTapEditor extends TipTapEditorBase {

closeLinkDialog(): void {
this.linkDialogExpanded = false;
this.editor.commands.focus();
}

showLinkDialog(): void {
Expand Down

0 comments on commit 4a95e51

Please sign in to comment.