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

fix(plunker): attach form to document before submitting #93

Merged
merged 1 commit into from
Feb 1, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/app/shared/plunker/plunker-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ export class PlunkerButton {
constructor(private plunkerWriter: PlunkerWriter) {}

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