Skip to content

Commit bfce8e2

Browse files
committed
fix(loading): backdrop higher z-index
1 parent 4c700e9 commit bfce8e2

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

Diff for: js/angular/service/backdrop.js

+9-10
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ function($document) {
3939

4040
var el = jqLite('<div class="backdrop">');
4141
var backdropHolds = 0;
42-
var backdropExtraClasses = null;
4342

4443
$document[0].body.appendChild(el[0]);
4544

@@ -57,23 +56,20 @@ function($document) {
5756
* Releases the backdrop.
5857
*/
5958
release: release,
59+
60+
getElement: getElement,
61+
6062
// exposed for testing
6163
_element: el
6264
};
6365

64-
function retain(extraClasses) {
65-
backdropExtraClasses = extraClasses;
66-
66+
function retain() {
6767
if ( (++backdropHolds) === 1 ) {
6868
el.addClass('visible');
6969
ionic.requestAnimationFrame(function() {
7070
backdropHolds && el.addClass('active');
7171
});
7272
}
73-
if(extraClasses) {
74-
console.log('Adding', extraClasses);
75-
el.addClass(extraClasses);
76-
}
7773
}
7874
function release() {
7975
if ( (--backdropHolds) === 0 ) {
@@ -82,7 +78,10 @@ function($document) {
8278
!backdropHolds && el.removeClass('visible');
8379
}, 100);
8480
}
85-
el.removeClass(backdropExtraClasses);
86-
backdropExtraClasses = null;
8781
}
82+
83+
function getElement() {
84+
return el;
85+
}
86+
8887
}]);

Diff for: js/angular/service/loading.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ function($document, $ionicTemplateLoader, $ionicBackdrop, $timeout, $q, $log, $c
141141
//options.showBackdrop: deprecated
142142
this.hasBackdrop = !options.noBackdrop && options.showBackdrop !== false;
143143
if (this.hasBackdrop) {
144-
$ionicBackdrop.retain('backdrop-loading');
144+
$ionicBackdrop.retain();
145+
$ionicBackdrop.getElement().addClass('backdrop-loading');
145146
}
146147
}
147148

@@ -176,6 +177,7 @@ function($document, $ionicTemplateLoader, $ionicBackdrop, $timeout, $q, $log, $c
176177
if (this.isShown) {
177178
if (this.hasBackdrop) {
178179
$ionicBackdrop.release();
180+
$ionicBackdrop.getElement().removeClass('backdrop-loading');
179181
}
180182
self.element.removeClass('active');
181183
setTimeout(function() {

0 commit comments

Comments
 (0)