diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-12-12 23:30:13 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-12-13 00:25:06 +0100 |
| commit | 98118bbde42112f74d2707c0a167a0a27191438c (patch) | |
| tree | 1963363be6bb90bfa6015838ada03de57509edc9 | |
| parent | c3ed6681ff8d446e68ce272be4bf66f4145f6e29 (diff) | |
| download | rust-98118bbde42112f74d2707c0a167a0a27191438c.tar.gz rust-98118bbde42112f74d2707c0a167a0a27191438c.zip | |
Fixes submit event of the search input
In HTML, when a button follows an input, 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.
| -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\" \ |
