File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,6 @@ angular
1212 } ) ;
1313
1414 $scope . onColorChange = function ( $event , color ) {
15- console . log ( $event , color ) ;
15+ console . log ( $event , color , $scope . color ) ;
1616 }
1717 } ) ;
Original file line number Diff line number Diff line change 143143 } ;
144144
145145 $scope . onBlur = function ( ) {
146- $scope . updateModel = true ;
147- $scope . update ( ) ;
146+ if ( $scope . ngModel !== $scope . onChangeValue ) {
147+ $scope . updateModel = true ;
148+ $scope . update ( ) ;
149+ }
148150 } ;
149151
150152 $scope . initConfig = function ( ) {
171173 } ;
172174
173175 $scope . show = function ( ) {
176+ // if already visible then don't run show again
177+ if ( $scope . visible ) {
178+ return true ;
179+ }
180+
174181 $scope . log ( 'Color Picker: Show Event' ) ;
175182 $scope . visible = true ;
176183 $scope . hueMouse = false ;
You can’t perform that action at this time.
0 commit comments