fix(ie/edge): form.method='delete', raises Invalid argument.#586
Merged
dhh merged 1 commit intohotwired:mainfrom Jun 19, 2022
Merged
fix(ie/edge): form.method='delete', raises Invalid argument.#586dhh merged 1 commit intohotwired:mainfrom
dhh merged 1 commit intohotwired:mainfrom
Conversation
|
An alternative (and less framework dependent) implementation would be to replace |
c52c16e to
b71533b
Compare
Member
|
Please strip ; as we don't use those in our linter. Thanks! |
b71533b to
24b1716
Compare
Contributor
Author
done. thanks for the review and turbo. |
dhh
pushed a commit
to feliperaul/turbo
that referenced
this pull request
Jul 16, 2022
* main: Allow frames to scroll smoothly into view (hotwired#607) Export Type declarations for `turbo:` events (hotwired#452) Add .php as a valid isHTML extension (hotwired#629) Add original click event to 'turbo:click' details (hotwired#611) Drive Browser tests with `playwright` (hotwired#609) Allow Turbo Streams w/ GET via `data-turbo-stream` (hotwired#612) Only update history when Turbo visit is renderable (hotwired#601) Support development ChromeDriver version overrides (hotwired#606) Turbo stream source (hotwired#415) Expose Frame load state via `[complete]` attribute (hotwired#487) fix(ie/edge): form.method='delete', raises Invalid argument. (hotwired#586) Do not declare global types/constants (hotwired#524) Defensively create custom turbo elements (hotwired#483) Use `replaceChildren` in StreamActions.update (hotwired#534)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IE issue (edge) : FormElement.method attribute only accepts "get|post". To my surprise, it seems to be the expected behaviour from the spec: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-submission-attributes. TLDR ;
So when the
form.methodattribute is notgetorpostIE/edge raises an Invalid argument error. How to reproduce: open ie edge console :document.createElement('form').method="delete"> raise Invalid argAt first, to avoid this issue, we I went the rails way creating an
<input type="hidden" value="{linkMethod}" name="_method" />appended to the "virtual" form. But tchak is right ; form.setAttribute('method') make it works