Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Commit

Permalink
attempt to handle keypress
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Dowland committed May 2, 2009
1 parent c4a43c6 commit 31a86dc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions javascript/outliner.js
Expand Up @@ -75,6 +75,13 @@ function edit_item_text(item) {
input.setAttribute("type", "text");
input.setAttribute("value", text);
item.replaceChild(input, item.firstChild);
input.addEventListener("keypress", function(e) {
if(13 == e.keyCode) { // return
alert("we should do something here");
alert(input.getAttribute("value"));
alert(item.innerHTML);
}
}, false);
// TODO: add an event for submission
}

Expand Down

0 comments on commit 31a86dc

Please sign in to comment.