diff --git a/www/common/common-interface.js b/www/common/common-interface.js index 79951c3c5..6ddf0a320 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -377,6 +377,14 @@ define([ field.focus(); }); + var $field = field.tokenfield.closest('.tokenfield').find('.token-input'); + $field.on('keypress', function (e) { + if (!$field.val() && e.which === 13) { return void $ok.click(); } + }); + $field.on('keydown', function (e) { + if (!$field.val() && e.which === 27) { return void $cancel.click(); } + }); + return tagger; }; diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 70b0d25ed..91dd5a403 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -1364,6 +1364,7 @@ define([ case 'import': button = $('