@@ -27,7 +27,25 @@ describe('bar directives', function() {
27
27
el . scope ( ) . $destroy ( ) ;
28
28
expect ( ionic . off ) . toHaveBeenCalledWith ( 'tap' , callback , el [ 0 ] ) ;
29
29
} ) ;
30
- it ( 'should ignore tap if it\'s in a button' , function ( ) {
30
+ [ 'input' , 'textarea' , 'select' ] . forEach ( function ( tag ) {
31
+ it ( 'should ignore tap if it\'s in a ' + tag , function ( ) {
32
+ var el = setup ( ) ;
33
+ spyOn ( ionic . DomUtil , 'rectContains' ) ;
34
+ var child = angular . element ( '<' + tag + '>' ) ;
35
+ el . append ( child ) ;
36
+ ionic . trigger ( 'tap' , { target : child [ 0 ] } , true , true ) ;
37
+ expect ( ionic . DomUtil . rectContains ) . not . toHaveBeenCalled ( ) ;
38
+ } ) ;
39
+ } ) ;
40
+ it ( 'should ignore tap if it\'s in a [contenteditable]' , function ( ) {
41
+ var el = setup ( ) ;
42
+ spyOn ( ionic . DomUtil , 'rectContains' ) ;
43
+ var child = angular . element ( '<div contenteditable>' ) ;
44
+ el . append ( child ) ;
45
+ ionic . trigger ( 'tap' , { target : child [ 0 ] } , true , true ) ;
46
+ expect ( ionic . DomUtil . rectContains ) . not . toHaveBeenCalled ( ) ;
47
+ } ) ;
48
+ it ( 'should ignore tap if it\'s in a .button' , function ( ) {
31
49
var el = setup ( ) ;
32
50
spyOn ( ionic . DomUtil , 'rectContains' ) ;
33
51
var child = angular . element ( '<div class="button">' ) ;
0 commit comments