Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

typeahead: Only return early from blur if parentElement is specified.

evykassirerc54ca567a9fd
diff --git a/web/third/bootstrap-typeahead/typeahead.js b/web/third/bootstrap-typeahead/typeahead.js
index ad10dcce5ef..11033c8cb0d 100644
--- a/web/third/bootstrap-typeahead/typeahead.js
+++ b/web/third/bootstrap-typeahead/typeahead.js
@@ -546,7 +546,7 @@ import {get_string_diff} from "../../src/util";
, blur: function (e) {
// Blurs that move focus to elsewhere within the parent element shouldn't
// hide the typeahead.
- if ($(e.relatedTarget).parents(this.options.parentElement).length > 0) {
+ if (this.options.parentElement && $(e.relatedTarget).parents(this.options.parentElement).length > 0) {
return;
}
var that = this