mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	search pills: Backspace should remove a search pill with typeahead open.
Fixes part of #10026. Typeaheads stopped propogation of keydown and keyup events for any key except tab and enter. If stopAdvance was true even tab and enter were not allowed. advanceKeyCodes option was added to typeahead which allowed to specify key codes for which propogation of keydown and keyup events should not stop. advanceKeyCodes does not respect the stopAdvance option. As the backspace key code is added to advanceKeyCodes in search.js, the backspace key deletes pill on pressing backspace if input is empty or only consists of spaces.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							4186ebe56a
						
					
				
				
					commit
					28589c5563
				
			@@ -117,6 +117,7 @@ exports.initialize = function () {
 | 
			
		||||
            return items;
 | 
			
		||||
        },
 | 
			
		||||
        stopAdvance: page_params.search_pills_enabled,
 | 
			
		||||
        advanceKeyCodes: [8],
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    searchbox_form.on('compositionend', function () {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user