We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 21b9822 + eea860f commit b310417Copy full SHA for b310417
src/librustdoc/html/static/main.js
@@ -1132,6 +1132,10 @@
1132
e.preventDefault();
1133
} else if (e.which === 16) { // shift
1134
// Does nothing, it's just to avoid losing "focus" on the highlighted element.
1135
+ } else if (e.which === 27) { // escape
1136
+ removeClass(actives[currentTab][0], 'highlighted');
1137
+ document.getElementsByClassName('search-input')[0].value = '';
1138
+ defocusSearchBar();
1139
} else if (actives[currentTab].length > 0) {
1140
removeClass(actives[currentTab][0], 'highlighted');
1141
}
0 commit comments