diff --git a/src/core/drive/navigator.ts b/src/core/drive/navigator.ts index 768cf7123..851195b85 100644 --- a/src/core/drive/navigator.ts +++ b/src/core/drive/navigator.ts @@ -44,11 +44,7 @@ export class Navigator { this.stop() this.formSubmission = new FormSubmission(this, form, submitter, true) - if (this.formSubmission.isIdempotent) { - this.proposeVisit(this.formSubmission.fetchRequest.url, { action: this.getActionForFormSubmission(this.formSubmission) }) - } else { - this.formSubmission.start() - } + this.formSubmission.start() } stop() { @@ -93,7 +89,8 @@ export class Navigator { } const { statusCode } = fetchResponse - const visitOptions = { response: { statusCode, responseHTML } } + const action = this.getActionForFormSubmission(formSubmission) + const visitOptions = { action, response: { statusCode, responseHTML } } this.proposeVisit(fetchResponse.location, visitOptions) } } diff --git a/src/core/frames/frame_controller.ts b/src/core/frames/frame_controller.ts index 7727f6491..06efcc4b6 100644 --- a/src/core/frames/frame_controller.ts +++ b/src/core/frames/frame_controller.ts @@ -152,13 +152,9 @@ export class FrameController implements AppearanceObserverDelegate, FetchRequest this.reloadable = false this.formSubmission = new FormSubmission(this, element, submitter) - if (this.formSubmission.fetchRequest.isIdempotent) { - this.navigateFrame(element, this.formSubmission.fetchRequest.url.href, submitter) - } else { - const { fetchRequest } = this.formSubmission - this.prepareHeadersForRequest(fetchRequest.headers, fetchRequest) - this.formSubmission.start() - } + const { fetchRequest } = this.formSubmission + this.prepareHeadersForRequest(fetchRequest.headers, fetchRequest) + this.formSubmission.start() } // Fetch request delegate diff --git a/src/tests/fixtures/form.html b/src/tests/fixtures/form.html index 0740572e8..079ca9a01 100644 --- a/src/tests/fixtures/form.html +++ b/src/tests/fixtures/form.html @@ -18,7 +18,12 @@