Skip to content

Commit 3213089

Browse files
authored
Rollup merge of #79985 - GuillaumeGomez:fix-submit-event, r=jyn514
Fixes submit event of the search input Fixes #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`
2 parents 424e44a + 98118bb commit 3213089

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/html/layout.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ crate fn render<T: Print, S: Print>(
9898
placeholder=\"Click or press ‘S’ to search, ‘?’ for more options…\" \
9999
type=\"search\">\
100100
</div>\
101-
<button class=\"help-button\">?</button>
101+
<button type=\"button\" class=\"help-button\">?</button>
102102
<a id=\"settings-menu\" href=\"{root_path}settings.html\">\
103103
<img src=\"{static_root_path}wheel{suffix}.svg\" \
104104
width=\"18\" \

0 commit comments

Comments
 (0)