File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/librustdoc/html/static/js Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,9 @@ function loadCss(cssFileName) {
201201 }
202202
203203 getSettingsButton ( ) . onclick = event => {
204+ if ( event . ctrlKey || event . altKey || event . metaKey ) {
205+ return ;
206+ }
204207 addClass ( getSettingsButton ( ) , "rotate" ) ;
205208 event . preventDefault ( ) ;
206209 // Sending request for the CSS and the JS files at the same time so it will
@@ -951,7 +954,11 @@ function loadCss(cssFileName) {
951954 } else {
952955 document . querySelector ( `#${ HELP_BUTTON_ID } > a` ) . addEventListener ( "click" , event => {
953956 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 ) {
955962 return ;
956963 }
957964 event . preventDefault ( ) ;
You can’t perform that action at this time.
0 commit comments