File tree 1 file changed +8
-1
lines changed
src/librustdoc/html/static/js
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,9 @@ function loadCss(cssFileName) {
201
201
}
202
202
203
203
getSettingsButton ( ) . onclick = event => {
204
+ if ( event . ctrlKey || event . altKey || event . metaKey ) {
205
+ return ;
206
+ }
204
207
addClass ( getSettingsButton ( ) , "rotate" ) ;
205
208
event . preventDefault ( ) ;
206
209
// Sending request for the CSS and the JS files at the same time so it will
@@ -951,7 +954,11 @@ function loadCss(cssFileName) {
951
954
} else {
952
955
document . querySelector ( `#${ HELP_BUTTON_ID } > a` ) . addEventListener ( "click" , event => {
953
956
const target = event . target ;
954
- if ( target . tagName !== "A" || target . parentElement . id !== HELP_BUTTON_ID ) {
957
+ if ( target . tagName !== "A" ||
958
+ target . parentElement . id !== HELP_BUTTON_ID ||
959
+ event . ctrlKey ||
960
+ event . altKey ||
961
+ event . metaKey ) {
955
962
return ;
956
963
}
957
964
event . preventDefault ( ) ;
You can’t perform that action at this time.
0 commit comments