From 0490b115ad031e6d1a03116e59d83cfeeb5bf068 Mon Sep 17 00:00:00 2001 From: yosmoc Date: Wed, 24 Aug 2016 22:34:34 +0200 Subject: [PATCH] submit the tag when receiving 'tab' key In existing implementation, 'enter' key is only allowed to submit the tag. However, if the user finishes to create the tag and make another tag, the user naturally send 'tab' key. When receiving 'tab' key, the focus will go to the star icon and nothing is submitted, but the text is still remained. This makes confusing to the user. This commit provide 'tab' key submitting the tag also. --- browser/main/Detail/TagSelect.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/browser/main/Detail/TagSelect.js b/browser/main/Detail/TagSelect.js index 06ba4f31..5c5b9d26 100644 --- a/browser/main/Detail/TagSelect.js +++ b/browser/main/Detail/TagSelect.js @@ -22,6 +22,10 @@ class TagSelect extends React.Component { handleNewTagInputKeyDown (e) { switch (e.keyCode) { + case 9: + e.preventDefault() + this.submitTag() + break case 13: this.submitTag() break