mirror of
https://github.com/golang/go
synced 2024-11-22 03:24:41 -07:00
misc/goplay: fix Tab and Shift+Enter in Firefox.
Fixes #1633. R=adg, dsymonds CC=golang-dev https://golang.org/cl/4439042
This commit is contained in:
parent
90e4ece365
commit
99b0eefd40
@ -235,8 +235,8 @@ function autoindent(el) {
|
|||||||
}, 1);
|
}, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function keyHandler() {
|
function keyHandler(event) {
|
||||||
var e = window.event;
|
var e = window.event || event;
|
||||||
if (e.keyCode == 9) { // tab
|
if (e.keyCode == 9) { // tab
|
||||||
insertTabs(1);
|
insertTabs(1);
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@ -290,7 +290,7 @@ function compileUpdate() {
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<table width="100%"><tr><td width="60%" valign="top">
|
<table width="100%"><tr><td width="60%" valign="top">
|
||||||
<textarea autofocus="true" id="edit" spellcheck="false" onkeydown="keyHandler();" onkeyup="autocompile();">«@|html»</textarea>
|
<textarea autofocus="true" id="edit" spellcheck="false" onkeydown="keyHandler(event);" onkeyup="autocompile();">«@|html»</textarea>
|
||||||
<div class="hints">
|
<div class="hints">
|
||||||
(Shift-Enter to compile and run.)
|
(Shift-Enter to compile and run.)
|
||||||
<input type="checkbox" id="autocompile" value="checked" /> Compile and run after each keystroke
|
<input type="checkbox" id="autocompile" value="checked" /> Compile and run after each keystroke
|
||||||
|
Loading…
Reference in New Issue
Block a user