summaryrefslogtreecommitdiffstats
path: root/extensions/BugModal
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/BugModal')
-rw-r--r--extensions/BugModal/web/bug_modal.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/extensions/BugModal/web/bug_modal.js b/extensions/BugModal/web/bug_modal.js
index 9d4cd83d0..fe1ae221e 100644
--- a/extensions/BugModal/web/bug_modal.js
+++ b/extensions/BugModal/web/bug_modal.js
@@ -343,11 +343,20 @@ $(function() {
delimiter: /,\s*/,
minChars: 0,
autoSelectFirst: true,
+ triggerSelectOnValidInput: false,
formatResult: function(suggestion, currentValue) {
// disable <b> wrapping of matched substring
return suggestion.value.htmlEncode();
},
+ onSearchStart: function(params) {
+ var that = $(this);
+ // adding spaces shouldn't initiate a new search
+ var parts = that.val().split(/,\s*/);
+ var query = parts[parts.length - 1];
+ return query === $.trim(query);
+ },
onSelect: function() {
+ this.value = this.value + ', ';
this.focus();
}
});