diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-12-13 11:05:48 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-13 11:05:48 +0900 |
| commit | 3213089c0292a5e3a1c0eae1ef845964eb91c51c (patch) | |
| tree | 182ddb024c1dcf3bdca699e9379087f564cf4942 | |
| parent | 424e44af002ce3708400dc741ab4bddf55f17940 (diff) | |
| parent | 98118bbde42112f74d2707c0a167a0a27191438c (diff) | |
| download | rust-3213089c0292a5e3a1c0eae1ef845964eb91c51c.tar.gz rust-3213089c0292a5e3a1c0eae1ef845964eb91c51c.zip | |
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`
| -rw-r--r-- | src/librustdoc/html/layout.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/layout.rs b/src/librustdoc/html/layout.rs index f2c74c46d7d..b5169b05997 100644 --- a/src/librustdoc/html/layout.rs +++ b/src/librustdoc/html/layout.rs @@ -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\" \ |
