mirror of https://github.com/zulip/zulip.git
Remove smartSpaceBar option from typeahead and search.
The option caused some race conditions on Firefox, and it is really made moot by the naturalSearch option anyway. (imported from commit dc7080c905ced9b2f4ad4275d82549acf09a59f7)
This commit is contained in:
parent
4b94b99c17
commit
546ae1023c
|
@ -485,8 +485,7 @@ exports.initialize = function () {
|
|||
updater: narrow_or_search_for_term,
|
||||
sorter: function (items) {
|
||||
return items;
|
||||
},
|
||||
smartSpaceBar: true
|
||||
}
|
||||
});
|
||||
|
||||
$("#searchbox_form").keydown(function (e) {
|
||||
|
|
|
@ -1849,19 +1849,6 @@
|
|||
this.$element.val(val)
|
||||
}
|
||||
|
||||
, select_and_continue: function () {
|
||||
// We don't call updater() because it potentially has side-effects.
|
||||
// This does mean that smartSpaceBar can't be used in cases where the
|
||||
// item values are transformed by updater(). It's generally imprudent
|
||||
// to do transformations in updater(), so this should be a
|
||||
// non-issue for most users.
|
||||
var val = this.$menu.find('.active').data('typeahead-value')
|
||||
this.$element
|
||||
.val(val + ' ')
|
||||
.change()
|
||||
return this.hide()
|
||||
}
|
||||
|
||||
, updater: function (item) {
|
||||
return item
|
||||
}
|
||||
|
@ -2058,14 +2045,6 @@
|
|||
this.select()
|
||||
break
|
||||
|
||||
case 32: // space
|
||||
if (this.options.smartSpaceBar) {
|
||||
if (!this.shown) return
|
||||
this.select_and_continue()
|
||||
}
|
||||
this.lookup()
|
||||
break
|
||||
|
||||
case 27: // escape
|
||||
if (!this.shown) return
|
||||
this.hide()
|
||||
|
|
Loading…
Reference in New Issue