diff --git a/godoc/static/playground.js b/godoc/static/playground.js index 8401157918..59d4cdab13 100644 --- a/godoc/static/playground.js +++ b/godoc/static/playground.js @@ -285,6 +285,9 @@ function PlaygroundOutput(el) { run(); e.preventDefault(); return false; + } if (e.ctrlKey) { // +control + fmt(); + e.preventDefault(); } else { autoindent(e.target); } diff --git a/godoc/static/static.go b/godoc/static/static.go index 2adb8858f9..6dad04f69f 100644 --- a/godoc/static/static.go +++ b/godoc/static/static.go @@ -2307,6 +2307,9 @@ function PlaygroundOutput(el) { run(); e.preventDefault(); return false; + } if (e.ctrlKey) { // +control + fmt(); + e.preventDefault(); } else { autoindent(e.target); }