mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	compose_typeahead: Ensure header is counted in position calculation.
Previously, there is a bug where the position of the typeahead is off whenever the user switches from stream typeahead to topic typeahead in the compose box. The typeahead header was not hidden before calculation of the position based on container height. These changes will include the header before calculating for the position.
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user