Skip to content

Commit 74fc465

Browse files
ilgonmiczoobestik
authored andcommitted
Fix of Firefox bug
1 parent 3e35a2c commit 74fc465

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/js-executor/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ export default class JsExecutor {
6464
return onError && onError.apply(this, arguments);
6565
};
6666

67+
// It is necessary to work in Firefox
68+
// for some reason resize function in Compose does not work in Firefox in invisible block
69+
this.iframe.style.display = 'block';
70+
6771
const result = await this.executeWasm(
6872
jsCode,
6973
wasm,
@@ -72,7 +76,9 @@ export default class JsExecutor {
7276
processError,
7377
);
7478

75-
if (!exception) {
79+
if (exception) {
80+
this.iframe.style.display = 'none';
81+
} else {
7682
this.iframe.style.display = 'block';
7783
if (outputHeight) this.iframe.style.height = `${outputHeight}px`;
7884
}

0 commit comments

Comments
 (0)