summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-06-02 07:32:01 +0200
committerByron Jones <glob@mozilla.com>2015-06-02 07:32:01 +0200
commit89e70fd3999e0155c6b81a7b94288c84bb849c32 (patch)
tree6f723b0035b1b23fb3a5a88c84b4fe5feb8b93c0 /extensions
parent00b57b53faec42b68b257ee3ad9f8cecbd0aff02 (diff)
downloadbugzilla-89e70fd3999e0155c6b81a7b94288c84bb849c32.tar.gz
bugzilla-89e70fd3999e0155c6b81a7b94288c84bb849c32.tar.xz
Bug 1169418: Can't enter space in Keyword field
Diffstat (limited to 'extensions')
-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();
}
});