From ba844075b3ee79b14b0f6b74587165c4d515521c Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Mon, 16 Jun 2014 11:36:20 +1000 Subject: [PATCH] go.tools/godoc/static: don't capture ctrl-tab in editor This fixes an issue where Firefox users can't ctrl-tab out to switch to other tabs when using the playground. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/106020043 --- godoc/static/playground.js | 2 +- godoc/static/static.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/godoc/static/playground.js b/godoc/static/playground.js index 70e0c802..84011579 100644 --- a/godoc/static/playground.js +++ b/godoc/static/playground.js @@ -275,7 +275,7 @@ function PlaygroundOutput(el) { } function keyHandler(e) { - if (e.keyCode == 9) { // tab + if (e.keyCode == 9 && !e.ctrlKey) { // tab (but not ctrl-tab) insertTabs(1); e.preventDefault(); return false; diff --git a/godoc/static/static.go b/godoc/static/static.go index 42dfa073..6b288833 100644 --- a/godoc/static/static.go +++ b/godoc/static/static.go @@ -2304,7 +2304,7 @@ function PlaygroundOutput(el) { } function keyHandler(e) { - if (e.keyCode == 9) { // tab + if (e.keyCode == 9 && !e.ctrlKey) { // tab (but not ctrl-tab) insertTabs(1); e.preventDefault(); return false;