Created
September 28, 2018 10:48
-
-
Save kugimiya/e15c05f2fa6d7b22f1027e62aaa7b5ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/design/backend/css/tygh/modals/popups.less b/design/backend/css/tygh/modals/popups.less | |
index 509c71ccb1..54c2b58484 100644 | |
--- a/design/backend/css/tygh/modals/popups.less | |
+++ b/design/backend/css/tygh/modals/popups.less | |
@@ -114,13 +114,6 @@ | |
} | |
} | |
-// Prevent scrolling page while popup is open. | |
-html.dialog-is-open { | |
- body { | |
- overflow-y: hidden !important; | |
- } | |
-} | |
- | |
@media (max-width: 767px) { | |
// New bigger close button | |
.ui-button.ui-dialog-titlebar-close { | |
diff --git a/js/tygh/block_manager.js b/js/tygh/block_manager.js | |
index 9f67f5d451..551429c5df 100644 | |
--- a/js/tygh/block_manager.js | |
+++ b/js/tygh/block_manager.js | |
@@ -160,7 +160,14 @@ function BlockManager_Class() | |
} | |
} | |
+ var currentScrollPosition = $(document).scrollTop(); | |
+ | |
$('#' + prop_container).ceDialog('open', {href: fn_url(href)}); | |
+ | |
+ $.ceEvent('on', 'ce.dialogclose', function () { | |
+ $('body,html').scrollTop(currentScrollPosition); | |
+ }); | |
+ | |
break; | |
case 'add-grid': | |
diff --git a/js/tygh/core.js b/js/tygh/core.js | |
index dc1152dc1e..1f2c0af817 100644 | |
--- a/js/tygh/core.js | |
+++ b/js/tygh/core.js | |
@@ -2484,8 +2484,6 @@ var Tygh = { | |
}; | |
})($); | |
- | |
- | |
/* | |
* Dialog opener | |
* | |
@@ -2770,7 +2768,6 @@ var Tygh = { | |
hide: 150, | |
open: function(e, u) { | |
- | |
var d = $(this); | |
var w = d.dialog('widget'); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment