Set focus when toggling comment window.
This commit is contained in:
@@ -133,7 +133,11 @@ window.onload = function() {
|
|||||||
|
|
||||||
// Hide dimmer, comment tool panel, and comment.
|
// Hide dimmer, comment tool panel, and comment.
|
||||||
$("#commentcancel").click(function() {
|
$("#commentcancel").click(function() {
|
||||||
|
// Restore focus on commentcancel but not on
|
||||||
|
// savecommentconfirm because the latter loads
|
||||||
|
// a new page.
|
||||||
hideCommentWindow();
|
hideCommentWindow();
|
||||||
|
editor.focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
var isCommentHidden = true;
|
var isCommentHidden = true;
|
||||||
@@ -150,7 +154,9 @@ window.onload = function() {
|
|||||||
isCommentHidden = false;
|
isCommentHidden = false;
|
||||||
darkness.style.visibility = "visible";
|
darkness.style.visibility = "visible";
|
||||||
commentToolPanel.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() {
|
$("#savecommentconfirm").click(function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user