Rollup merge of #79985 - GuillaumeGomez:fix-submit-event, r=jyn514

Fixes submit event of the search input

Fixes https://github.com/rust-lang/rust/issues/79960

It's a very funny corner case:

In HTML, when a button follows an input (in a `form`), if the enter keep is pressed on the input, instead of sending the submit event to the input, it'll create a click event on the button following it, which in this case made the help popup show up whenever "enter" was pressed.

cc `@camelid`

r? `@jyn514`
This commit is contained in:
Yuki Okushi 2020-12-13 11:05:48 +09:00 committed by GitHub
commit 3213089c02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -98,7 +98,7 @@ crate fn render<T: Print, S: Print>(
placeholder=\"Click or press S to search, ? for more options…\" \
type=\"search\">\
</div>\
<button class=\"help-button\">?</button>
<button type=\"button\" class=\"help-button\">?</button>
<a id=\"settings-menu\" href=\"{root_path}settings.html\">\
<img src=\"{static_root_path}wheel{suffix}.svg\" \
width=\"18\" \