Skip to content

Commit 3b2a8e1

Browse files
committed
librustdoc: don't override ctrl-s and other browser shortcuts
1 parent 7839827 commit 3b2a8e1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/librustdoc/html/static/main.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@
101101
if (document.activeElement.tagName == "INPUT")
102102
return;
103103

104+
// Don't interfere with browser shortcuts
105+
if (ev.ctrlKey || ev.altKey || ev.metaKey)
106+
return;
107+
104108
switch (getVirtualKey(ev)) {
105109
case "Escape":
106110
if (!$("#help").hasClass("hidden")) {

0 commit comments

Comments
 (0)