mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 08:28:50 +02:00
Inert attribute for content outside of modal
This commit is contained in:
parent
a78e4d1327
commit
2bd4d44190
1 changed files with 11 additions and 0 deletions
|
@ -251,6 +251,11 @@ var ModalView = Backbone.View.extend({
|
|||
},
|
||||
|
||||
show: function() {
|
||||
Array.from(document.body.children).forEach(function(child) {
|
||||
if (child.className === 'modalView') return;
|
||||
child.setAttribute('inert', '');
|
||||
});
|
||||
|
||||
this.toggleZ(true);
|
||||
// on reflow, change our class to animate. for whatever
|
||||
// reason if this is done immediately, chrome might combine
|
||||
|
@ -268,6 +273,12 @@ var ModalView = Backbone.View.extend({
|
|||
this.toggleZ(false);
|
||||
}
|
||||
}.bind(this), this.getAnimationTime());
|
||||
|
||||
|
||||
Array.from(document.body.children).forEach(function(child) {
|
||||
if (child.className === 'modalView') return;
|
||||
child.removeAttribute('inert');
|
||||
});
|
||||
},
|
||||
|
||||
getInsideElement: function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue