From 4c75232a8022d2ed606f79109dccf7e1e710927c Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sat, 20 Sep 2014 09:09:28 +0200 Subject: [PATCH] Fixed tag input not adding current tag on blur --- TODO | 2 -- public_html/js/Controls/TagInput.js | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/TODO b/TODO index 07ad80ce..ec0fd582 100644 --- a/TODO +++ b/TODO @@ -3,8 +3,6 @@ first major release. everything related to posts: - uploads - - tag input: make tag of current text on input blur (e.g. user types - "tag" and submits the form, "tag" should appear on tag list) - user shouldn't be able click form rows when upload is active - fix thumbnails for files that are neither youtube or images diff --git a/public_html/js/Controls/TagInput.js b/public_html/js/Controls/TagInput.js index 44ff45f7..0b5b133b 100644 --- a/public_html/js/Controls/TagInput.js +++ b/public_html/js/Controls/TagInput.js @@ -45,6 +45,9 @@ App.Controls.TagInput = function( }); $input.unbind('blur').bind('blur', function(e) { $wrapper.removeClass('focused'); + var tag = $input.val(); + addTag(tag); + $input.val(''); }); $input.unbind('paste').bind('paste', function(e) {