Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

history-small fix. focus is now correct

  • Loading branch information...
commit 03a6021d2f2f69c9a6c9d74ad136d5cd6bf70f9e 1 parent 8224074
kanalj authored
Showing with 9 additions and 2 deletions.
  1. +1 −1  ghci.html
  2. +8 −1 haskell.hiji.js
View
2  ghci.html
@@ -20,7 +20,7 @@
<body>
<h1>HIJi</h1>
- <h2>Bringing you the power of GHCI to the interwebs</h2>
+ <h2>Bringing you the power of GHCi to the interwebs</h2>
<div id="hiji" class="ghci-look"></div>
</body>
</html>
View
9 haskell.hiji.js
@@ -32,6 +32,9 @@
this.html("<ol>" + makeInput(modules) + "</ol>");
+
+ $("input:text:visible:first").focus();
+
// pressing keyUP and keyDown
// history-related
document.onkeydown = function(e){
@@ -55,6 +58,10 @@
var output = makeOutput(evaluateHaskell(line,{}));
$('.input', this).after(output).replaceWith(newLine);
$("ol",this).append(makeInput(modules));
+
+ //set focus
+ $("input:text:visible:first").focus();
+
hiss.addHistory(line);
}
@@ -84,7 +91,7 @@ historry = function (){
this.newer = function(){
this.pointer--;
if(this.pointer < 0){
- this.pointer = 0
+ this.pointer = -1
return "";
}
return this.history_array[this.pointer];
Please sign in to comment.
Something went wrong with that request. Please try again.