From 7ce0aa6b54c55561f3f02794535c2bfca6f68fe3 Mon Sep 17 00:00:00 2001 From: Anupam Negi Date: Mon, 2 Jul 2018 20:13:12 +0530 Subject: [PATCH] fixing issue https://github.com/Pixabay/jQuery-tagEditor/issues/110 --- jquery.tag-editor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jquery.tag-editor.js b/jquery.tag-editor.js index 719ae04..6fa574e 100644 --- a/jquery.tag-editor.js +++ b/jquery.tag-editor.js @@ -311,6 +311,7 @@ // enter key else if (e.which == 13) { ed.trigger('click', [$t.closest('li').next('li').find('.tag-editor-tag')]); + o.onSubmit(ed,tag_list); // trigger blur if maxTags limit is reached if (o.maxTags && ed.data('tags').length >= o.maxTags) ed.find('input').blur(); @@ -365,6 +366,7 @@ // callbacks onChange: function(){}, beforeTagSave: function(){}, - beforeTagDelete: function(){} + beforeTagDelete: function(){}, + onSubmit: function () {} }; }(jQuery));