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.

compose_typeahead: Ensure header is counted in position calculation.

Joeluteedfb2a394878
diff --git a/web/third/bootstrap-typeahead/typeahead.js b/web/third/bootstrap-typeahead/typeahead.js
index 169a1f7ccb4..1971b4d87ad 100644
--- a/web/third/bootstrap-typeahead/typeahead.js
+++ b/web/third/bootstrap-typeahead/typeahead.js
@@ -199,6 +199,14 @@ import {get_string_diff} from "../../src/util";
}
, show: function () {
+ var header_text = this.header();
+ if (header_text) {
+ this.$header.find('span#typeahead-header-text').html(header_text);
+ this.$header.show();
+ } else {
+ this.$header.hide();
+ }
+
var pos;
if (this.fixed) {
@@ -230,14 +238,6 @@ import {get_string_diff} from "../../src/util";
, left: pos.left
})
- var header_text = this.header();
- if (header_text) {
- this.$header.find('span#typeahead-header-text').html(header_text);
- this.$header.show();
- } else {
- this.$header.hide();
- }
-
this.$container.show()
this.shown = true
this.mouse_moved_since_typeahead = false