-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(backdrop): Changed z-index for loading backdrop only. Fixes #1428
- Loading branch information
Showing
4 changed files
with
22 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ function($document) { | |
|
||
var el = jqLite('<div class="backdrop">'); | ||
var backdropHolds = 0; | ||
var backdropExtraClasses = null; | ||
|
||
$document[0].body.appendChild(el[0]); | ||
|
||
|
@@ -60,13 +61,19 @@ function($document) { | |
_element: el | ||
}; | ||
|
||
function retain() { | ||
function retain(extraClasses) { | ||
backdropExtraClasses = extraClasses; | ||
|
||
if ( (++backdropHolds) === 1 ) { | ||
el.addClass('visible'); | ||
ionic.requestAnimationFrame(function() { | ||
backdropHolds && el.addClass('active'); | ||
}); | ||
} | ||
if(extraClasses) { | ||
console.log('Adding', extraClasses); | ||
el.addClass(extraClasses); | ||
} | ||
} | ||
function release() { | ||
if ( (--backdropHolds) === 0 ) { | ||
|
@@ -75,5 +82,7 @@ function($document) { | |
!backdropHolds && el.removeClass('visible'); | ||
}, 100); | ||
} | ||
el.removeClass(backdropExtraClasses); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ajoslin
via email
Contributor
|
||
backdropExtraClasses = null; | ||
} | ||
}]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
What if extraClasses has changed since the last retain?