Commit 2425aab9 by Frances Botsford Committed by Andy Armstrong

maintain scroll position after closing the component editing modal in Studio

parent df32f109
...@@ -11,6 +11,7 @@ define(["jquery", "underscore", "underscore.string", "gettext", "js/views/basevi ...@@ -11,6 +11,7 @@ define(["jquery", "underscore", "underscore.string", "gettext", "js/views/basevi
}), }),
show: function() { show: function() {
this.lastPosition = $(document).scrollTop();
$('body').addClass('modal-window-is-shown'); $('body').addClass('modal-window-is-shown');
this.$('.wrapper-modal-window').addClass('is-shown'); this.$('.wrapper-modal-window').addClass('is-shown');
}, },
...@@ -18,6 +19,7 @@ define(["jquery", "underscore", "underscore.string", "gettext", "js/views/basevi ...@@ -18,6 +19,7 @@ define(["jquery", "underscore", "underscore.string", "gettext", "js/views/basevi
hide: function() { hide: function() {
$('body').removeClass('modal-window-is-shown'); $('body').removeClass('modal-window-is-shown');
this.$('.wrapper-modal-window').removeClass('is-shown'); this.$('.wrapper-modal-window').removeClass('is-shown');
$(document).scrollTop(this.lastPosition);
} }
}); });
......
...@@ -59,20 +59,6 @@ textarea.text { ...@@ -59,20 +59,6 @@ textarea.text {
// forms - additional UI // forms - additional UI
form { form {
.field {
margin-bottom: ($baseline/2);
}
label {
@include font-size(14);
display: block;
font-weight: bold;
}
input[type="text"] {
@extend %t-copy-sub1;
}
.note { .note {
@include box-sizing(border-box); @include box-sizing(border-box);
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
// start with the view/body // start with the view/body
[class*="view-"] { [class*="view-"] {
overflow: initial;
// modal-window backdrop covers the window // modal-window backdrop covers the window
.wrapper-modal-window { .wrapper-modal-window {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment