Set focus when toggling comment window.

This commit is contained in:
bootstraponline
2012-05-18 11:08:27 -06:00
parent dc80fd9b15
commit 3c10a6bf94
@@ -133,7 +133,11 @@ window.onload = function() {
// Hide dimmer, comment tool panel, and comment.
$("#commentcancel").click(function() {
// Restore focus on commentcancel but not on
// savecommentconfirm because the latter loads
// a new page.
hideCommentWindow();
editor.focus();
});
var isCommentHidden = true;
@@ -150,7 +154,9 @@ window.onload = function() {
isCommentHidden = false;
darkness.style.visibility = "visible";
commentToolPanel.style.visibility = "visible";
comment.style.visibility = "visible";
comment.style.visibility = "visible";
// Set focus so typing can begin immediately.
commentEditor.focus();
});
$("#savecommentconfirm").click(function() {