Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit 05a0048

Browse files
authored
fix(plunker): attach form to document before submitting (#93)
1 parent f3f91bb commit 05a0048

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/app/shared/plunker/plunker-button.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ export class PlunkerButton {
3232
constructor(private plunkerWriter: PlunkerWriter) {}
3333

3434
openPlunker(): void {
35+
// When the form is submitted, it must be in the document body. The standard of forms is not
36+
// to submit if it is detached from the document. See the following chromium commit for
37+
// more details:
38+
// https://chromium.googlesource.com/chromium/src/+/962c2a22ddc474255c776aefc7abeba00edc7470%5E!
39+
document.body.appendChild(this.plunkerForm);
3540
this.plunkerForm.submit();
41+
document.body.removeChild(this.plunkerForm);
3642
}
3743
}

0 commit comments

Comments
 (0)