Skip to content

Instantly share code, notes, and snippets.

@sekimura
Created April 3, 2009 21:01
Show Gist options
  • Save sekimura/89965 to your computer and use it in GitHub Desktop.
Save sekimura/89965 to your computer and use it in GitHub Desktop.
bug ? Firefox 3.0.8 on Mac OS X
<html>
<head>
<!-- http://labs.qootas.org/tmp/keycode.html -->
<script type="text/javascript">
function $(id){ return document.getElementById(id) }
function test(e) {
if (e.keyCode == 9) {
var ta = $('ta');
ta.value = 'tab';
ta.focus();
}
}
</script>
</head>
<body>
<textarea id="ta" onkeydown="test(event)"></textarea>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment