From ba4f976e3b01a43b1ee9bad9f462da8755c3110e Mon Sep 17 00:00:00 2001 From: or-else Date: Wed, 28 Mar 2018 16:39:22 -0700 Subject: [PATCH] cancel tag editor on escape key --- index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 1ef2e662..602c77bd 100644 --- a/index.html +++ b/index.html @@ -913,7 +913,7 @@ if (this.props.onEnter) { this.props.onEnter(this.state.input); } - } else if (e.keyCode === 27) { + } else if (e.key === 'Escape') { if (this.props.onCancel) { this.props.onCancel(); } @@ -1643,6 +1643,7 @@ avatarDisabled={true} prompt={this.state.noTagsMessage} onEnter={this.handleAddTag} + onCancel={this.handleCancel} onChipRemoved={this.handleRemoveTag} filterFunc={this.handleTagInput} /> {this.props.onSubmit || this.props.onCancel ?