Skip to content

Commit 725132c

Browse files
committed
js: isso.js: Focus textarea on leaving preview mode
1 parent ff848fe commit 725132c

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

isso/js/app/isso.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,14 @@ var Postbox = function(parent) {
8181
$(".isso-preview .isso-text", el).innerHTML = '';
8282
el.classList.remove('isso-preview-mode');
8383
};
84-
$("[name='edit']", el).on("click", edit);
85-
$(".isso-preview", el).on("click", edit);
84+
$("[name='edit']", el).on("click", function() {
85+
edit();
86+
$(".isso-textarea", el).focus();
87+
});
88+
$(".isso-preview", el).on("click", function() {
89+
edit();
90+
$(".isso-textarea", el).focus();
91+
});
8692

8793
// submit form, initialize optional fields with `null` and reset form.
8894
// If replied to a comment, remove form completely.

0 commit comments

Comments
 (0)