Ivan - Fix modal positioning [skip ci]

This commit is contained in:
ivan 2016-10-13 21:25:10 -03:00
parent 6083c8731d
commit a51bc5c3ad
3 changed files with 8 additions and 8 deletions

View File

@ -2,11 +2,4 @@
.application {
padding: $half-space;
&_modal-opened {
.application__content {
position: fixed;
overflow: hidden;
}
}
}

View File

@ -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;

View File

@ -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