Skip to content

Commit

Permalink
fix(loading): prevent spinners in loading view from causing reflows w…
Browse files Browse the repository at this point in the history
…hen hidden. Closes #2013
  • Loading branch information
perrygovier committed Sep 17, 2014
1 parent bcfecb4 commit 767ce6a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion js/angular/service/loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var LOADING_SET_DEPRECATED = '$ionicLoading instance.setContent() has been depre
*/
IonicModule
.constant('$ionicLoadingConfig', {
template: '<i class="ion-loading-d"></i>'
template: '<i class="icon ion-loading-d"></i>'
})
.factory('$ionicLoading', [
'$ionicLoadingConfig',
Expand Down
3 changes: 3 additions & 0 deletions scss/_loading.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
visibility: hidden;
opacity: 0;

&:not(.visible) .icon {
display: none;
}
&.visible {
visibility: visible;
}
Expand Down
2 changes: 1 addition & 1 deletion test/html/loading.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
.controller('LoadingCtrl', function($scope, $ionicLoading) {
$scope.startLoading = function() {
$ionicLoading.show({
template: '<div>Connection problem.</div><br/><div>Please check your internet connection!</div>',
//template: '<div>Connection problem.</div><br/><div>Please check your internet connection!</div>',
delay: 100,
duration: 3000
});
Expand Down

0 comments on commit 767ce6a

Please sign in to comment.