Ivan - Fix modal positioning [skip ci]
This commit is contained in:
parent
6083c8731d
commit
a51bc5c3ad
|
@ -2,11 +2,4 @@
|
|||
|
||||
.application {
|
||||
padding: $half-space;
|
||||
|
||||
&_modal-opened {
|
||||
.application__content {
|
||||
position: fixed;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,11 +1,14 @@
|
|||
.modal {
|
||||
position: absolute;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
padding: 50px 0;
|
||||
overflow: auto;
|
||||
z-index: 1000;
|
||||
|
||||
&__content {
|
||||
position: relative;
|
||||
|
|
|
@ -19,6 +19,8 @@ class ModalReducer extends Reducer {
|
|||
}
|
||||
|
||||
onOpenModal(state, payload) {
|
||||
document.body.setAttribute('style', 'overflow:hidden');
|
||||
|
||||
return _.extend({}, state, {
|
||||
opened: true,
|
||||
content: payload
|
||||
|
@ -26,6 +28,8 @@ class ModalReducer extends Reducer {
|
|||
}
|
||||
|
||||
onCloseModal(state) {
|
||||
document.body.setAttribute('style', '');
|
||||
|
||||
return _.extend({}, state, {
|
||||
opened: false,
|
||||
content: null
|
||||
|
|
Loading…
Reference in New Issue