Skip to content

Commit 1dbba46

Browse files
committed
Remove missing responsive styles fix
1 parent df4702f commit 1dbba46

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

src/js/events/optionsChanged.js

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,6 @@
11
import { getBlockId, getEmbedIframe, getBlockIframe, getBlockWindow, getEditorDocument } from '../utils';
22
import { dispatch } from '@wordpress/data';
33

4-
function maybeFixIframe(window) {
5-
setTimeout(() => {
6-
if (window.document.getElementById('iframely-styles')) {
7-
return;
8-
}
9-
let style = window.document.createElement('style');
10-
style.textContent = `.iframely-responsive {
11-
top: 0;
12-
left: 0;
13-
width: 100%;
14-
height: 0;
15-
position: relative;
16-
padding-bottom: 56.25%;
17-
box-sizing: border-box;
18-
}
19-
.iframely-responsive > * {
20-
top: 0;
21-
left: 0;
22-
width: 100%;
23-
height: 100%;
24-
position: absolute;
25-
border: 0;
26-
box-sizing: border-box;
27-
}`;
28-
window.document.head.appendChild(style);
29-
}, 50);
30-
}
31-
324
export function optionsChanged(id, formContainer, query) {
335
const blockId = getBlockId();
346
const blockIframe = getBlockIframe(blockId);
@@ -54,8 +26,6 @@ export function optionsChanged(id, formContainer, query) {
5426
src += (src.indexOf('?') > -1 ? '&' : '?') + key + '=' + query[key];
5527
});
5628

57-
maybeFixIframe(getBlockWindow(getBlockId()));
58-
5929
embedIframe.src = src;
6030

6131
dispatch('core/block-editor').updateBlockAttributes(blockId, { iquery: query });

0 commit comments

Comments
 (0)