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 { .application {
padding: $half-space; padding: $half-space;
&_modal-opened {
.application__content {
position: fixed;
overflow: hidden;
}
}
} }

View File

@ -1,11 +1,14 @@
.modal { .modal {
position: absolute; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
background-color: rgba(0, 0, 0, 0.8); background-color: rgba(0, 0, 0, 0.8);
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
padding: 50px 0;
overflow: auto;
z-index: 1000;
&__content { &__content {
position: relative; position: relative;

View File

@ -19,6 +19,8 @@ class ModalReducer extends Reducer {
} }
onOpenModal(state, payload) { onOpenModal(state, payload) {
document.body.setAttribute('style', 'overflow:hidden');
return _.extend({}, state, { return _.extend({}, state, {
opened: true, opened: true,
content: payload content: payload
@ -26,6 +28,8 @@ class ModalReducer extends Reducer {
} }
onCloseModal(state) { onCloseModal(state) {
document.body.setAttribute('style', '');
return _.extend({}, state, { return _.extend({}, state, {
opened: false, opened: false,
content: null content: null