Skip to content

Commit 5886309

Browse files
committed
Rich Text: Ensure format toolbar manages its own dismissal
Previously only closed on esc when editing link, not adding new link TODO: Consolidate editing state
1 parent bf49ca9 commit 5886309

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

blocks/rich-text/format-toolbar/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class FormatToolbar extends Component {
6464

6565
onKeyDown( event ) {
6666
if ( event.keyCode === ESCAPE ) {
67-
if ( this.state.isEditingLink ) {
67+
if ( this.state.isEditingLink || this.state.isAddingLink ) {
6868
event.stopPropagation();
6969
this.dropLink();
7070
}

0 commit comments

Comments
 (0)