Fix scrolling issues of iFrame.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
{{> (include_partial "layouts/partials/head") }}
|
||||
|
||||
<body>
|
||||
<body class="{{#if iframeMode}}body--iframe{{/if}}">
|
||||
|
||||
<main>
|
||||
{{> (include_block_template) }}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
{{> (include_partial "layouts/partials/head") }}
|
||||
|
||||
<body>
|
||||
<body class="{{#if iframeMode}}body--iframe{{/if}}">
|
||||
|
||||
<main>
|
||||
<div class="container">
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
</script>
|
||||
|
||||
<div class="preview">
|
||||
<iframe id="preview_frame" src="{{ previewFrameUrl }}" class="breakpoint"></iframe>
|
||||
<iframe id="preview_frame" src="{{ previewFrameUrl }}?iframe=true" class="breakpoint"></iframe>
|
||||
</div>
|
||||
|
||||
<script src="/scripts/dist/index.min.js"></script>
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -98,7 +98,12 @@ function DataOptions(props = {}) {
|
||||
|
||||
async function changeDataOption(e) {
|
||||
const dataName = e.target.value;
|
||||
props.rootAttributes.previewFrame.src = window.devTool.previewFrameUrl + '?data=' + dataName;
|
||||
|
||||
const previewFrameUrl = new URL(window.devTool.previewFrameUrl);
|
||||
previewFrameUrl.searchParams.set('data', dataName);
|
||||
previewFrameUrl.searchParams.set('iframe', 'true');
|
||||
|
||||
props.rootAttributes.previewFrame.src = previewFrameUrl.href;
|
||||
|
||||
const dataOption = await fetchDataOptions(dataName);
|
||||
updateState(Object.assign({}, dataOption, {dataName}));
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
body {
|
||||
margin: 0;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
main {
|
||||
@@ -8,4 +7,11 @@ main {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.body--iframe {
|
||||
overflow-y: hidden;
|
||||
}
|
||||
.body--iframe main {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=page--view.css.map */
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"sourceRoot":"","sources":["page--view.scss"],"names":[],"mappings":"AAAA;EACE;EACA;;;AAGF;EACE;EACA","file":"page--view.css"}
|
||||
{"version":3,"sourceRoot":"","sources":["page--view.scss"],"names":[],"mappings":"AAAA;EACE;;;AAGF;EACE;EACA;;;AAIF;EACE;;AAEA;EACE","file":"page--view.css"}
|
||||
@@ -1,6 +1,5 @@
|
||||
body {
|
||||
margin: 0;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
main {
|
||||
@@ -8,11 +7,11 @@ main {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
// Container rules must be provided by the projectStyles (theme).
|
||||
//.container {
|
||||
// max-width: 1200px;
|
||||
// margin-left: auto;
|
||||
// margin-right: auto;
|
||||
// padding-left: 15px;
|
||||
// padding-right: 15px;
|
||||
//}
|
||||
// iFrame mode
|
||||
.body--iframe {
|
||||
overflow-y: hidden;
|
||||
|
||||
main {
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user