@@ -2751,6 +2751,30 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
27512751 filterUIRow = fix . debugElement . query ( By . css ( FILTER_UI_ROW ) ) ;
27522752 expect ( filterUIRow ) . toBeNull ( 'Default filter template was found on a column with custom filtering.' ) ;
27532753 } ) ) ;
2754+
2755+ it ( 'Should not prevent mousedown event when target is within the filter cell template' , fakeAsync ( ( ) => {
2756+ const filterCell = GridFunctions . getFilterCell ( fix , 'ProductName' ) ;
2757+ const input = filterCell . query ( By . css ( 'input' ) ) . nativeElement ;
2758+
2759+ const mousedownEvent = new MouseEvent ( 'mousedown' , { bubbles : true } ) ;
2760+ const preventDefaultSpy = spyOn ( mousedownEvent , 'preventDefault' ) ;
2761+ input . dispatchEvent ( mousedownEvent , { bubbles : true } ) ;
2762+ fix . detectChanges ( ) ;
2763+
2764+ expect ( preventDefaultSpy ) . not . toHaveBeenCalled ( ) ;
2765+ } ) ) ;
2766+
2767+ it ( 'Should prevent mousedown event when target is filter cell or its parent elements' , fakeAsync ( ( ) => {
2768+ const filteringCells = fix . debugElement . queryAll ( By . css ( FILTER_UI_CELL ) ) ;
2769+ const firstCell = filteringCells [ 0 ] . nativeElement ;
2770+
2771+ const mousedownEvent = new MouseEvent ( 'mousedown' , { bubbles : true } ) ;
2772+ const preventDefaultSpy = spyOn ( mousedownEvent , 'preventDefault' ) ;
2773+ firstCell . dispatchEvent ( mousedownEvent ) ;
2774+ fix . detectChanges ( ) ;
2775+
2776+ expect ( preventDefaultSpy ) . toHaveBeenCalled ( ) ;
2777+ } ) ) ;
27542778 } ) ;
27552779
27562780 describe ( null , ( ) => {
@@ -2827,6 +2851,7 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
28272851
28282852 expect ( grid . rowList . length ) . toEqual ( 1 ) ;
28292853 } ) ) ;
2854+
28302855 } ) ;
28312856
28322857 describe ( 'Filtering events' , ( ) => {
0 commit comments