This repository was archived by the owner on May 29, 2019. It is now read-only.
File tree 2 files changed +0
-33
lines changed
2 files changed +0
-33
lines changed Original file line number Diff line number Diff line change @@ -82,18 +82,6 @@ angular.module('ui.bootstrap.buttons', [])
82
82
ngModelCtrl . $render ( ) ;
83
83
} ) ;
84
84
} ) ;
85
-
86
- //accessibility
87
- element . on ( 'keypress' , function ( e ) {
88
- if ( attrs . disabled || e . which !== 32 || $document [ 0 ] . activeElement !== element [ 0 ] ) {
89
- return ;
90
- }
91
-
92
- scope . $apply ( function ( ) {
93
- ngModelCtrl . $setViewValue ( element . hasClass ( buttonsCtrl . activeClass ) ? getFalseValue ( ) : getTrueValue ( ) ) ;
94
- ngModelCtrl . $render ( ) ;
95
- } ) ;
96
- } ) ;
97
85
}
98
86
} ;
99
87
} ] ) ;
Original file line number Diff line number Diff line change @@ -74,27 +74,6 @@ describe('buttons', function() {
74
74
expect ( btn ) . not . toHaveClass ( 'active' ) ;
75
75
} ) ;
76
76
77
- it ( 'should toggle custom model values on spacebar if focused' , function ( ) {
78
- $scope . model = 0 ;
79
- var btn = compileButton ( '<button ng-model="model" uib-btn-checkbox btn-checkbox-true="1" btn-checkbox-false="0">click</button>' , $scope ) ;
80
- $ ( 'body' ) . append ( btn ) ;
81
- var e = $ . Event ( 'keypress' ) ;
82
- e . which = 32 ;
83
-
84
- btn [ 0 ] . focus ( ) ;
85
- btn . trigger ( e ) ;
86
- $scope . $digest ( ) ;
87
- expect ( $scope . model ) . toEqual ( 1 ) ;
88
- expect ( btn ) . toHaveClass ( 'active' ) ;
89
-
90
- btn . trigger ( e ) ;
91
- $scope . $digest ( ) ;
92
- expect ( $scope . model ) . toEqual ( 0 ) ;
93
- expect ( btn ) . not . toHaveClass ( 'active' ) ;
94
-
95
- btn . remove ( ) ;
96
- } ) ;
97
-
98
77
it ( 'should monitor true / false value changes - issue 666' , function ( ) {
99
78
100
79
$scope . model = 1 ;
You can’t perform that action at this time.
0 commit comments