Skip to content
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
17 changes: 17 additions & 0 deletions web/src/navigator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,23 @@ impl NavigatorBackend for WebNavigatorBackend {
form.set_target(target);
}

if navmethod == NavigationMethod::Get {
// Browsers will clobber any query string with "the whole form input", so we need to re-add them here
for (key, value) in url.query_pairs() {
let hidden: HtmlInputElement = document
.create_element("input")
.expect("create_element() must succeed")
.dyn_into()
.expect("create_element(\"input\") didn't give us an input");

hidden.set_type("hidden");
hidden.set_name(&key);
hidden.set_value(&value);

let _ = form.append_child(&hidden);
}
}

for (key, value) in formvars {
let hidden: HtmlInputElement = document
.create_element("input")
Expand Down
Loading