summaryrefslogtreecommitdiff
path: root/web-ui
diff options
context:
space:
mode:
authorDuda Dornelles <dudassdornelles@gmail.com>2015-01-27 16:26:01 -0200
committerPixpoa pairing <pixpoapairing@pixelated-project.org>2015-01-27 16:26:01 -0200
commita211149d2a1bdf21b970cdff1bd5a31a9ecdadaf (patch)
tree01ee96303bb438e2acfeada4324f98dd1939f4fa /web-ui
parent2f25e6429d9d846632314d093591ad413fac0d9e (diff)
#184 not creating empty tags of any length (as opposed to only empty strings with len==0)
Diffstat (limited to 'web-ui')
-rw-r--r--web-ui/app/js/mail_view/ui/mail_view.js2
-rw-r--r--web-ui/test/spec/mail_view/ui/mail_view.spec.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/web-ui/app/js/mail_view/ui/mail_view.js b/web-ui/app/js/mail_view/ui/mail_view.js
index eb55dbd5..136b701c 100644
--- a/web-ui/app/js/mail_view/ui/mail_view.js
+++ b/web-ui/app/js/mail_view/ui/mail_view.js
@@ -157,7 +157,7 @@ define(
if (event.which === ENTER_KEY){
event.preventDefault();
- if (this.select('newTagInput').val() !== '') {
+ if (this.select('newTagInput').val().trim() !== '') {
this.createNewTag();
}
} else if (event.which === ESC_KEY) {
diff --git a/web-ui/test/spec/mail_view/ui/mail_view.spec.js b/web-ui/test/spec/mail_view/ui/mail_view.spec.js
index 7d464bcd..55b37de2 100644
--- a/web-ui/test/spec/mail_view/ui/mail_view.spec.js
+++ b/web-ui/test/spec/mail_view/ui/mail_view.spec.js
@@ -188,7 +188,7 @@ describeComponent('mail_view/ui/mail_view', function () {
this.component.select('newTagButton').click();
var newTagInputComponent = this.component.select('newTagInput');
- newTagInputComponent.val('');
+ newTagInputComponent.val(' ');
var e = creatingEvent('keydown', 13); //ENTER KEY EVENT
newTagInputComponent.trigger(e);