#1875: Add shift-e shortcut for opening dialog

Additionally, fit the textarea's size to its contents on open.
This commit is contained in:
Toks
2013-07-27 13:57:12 -04:00
parent 20f0ade4e0
commit eeb5c861e4
2 changed files with 21 additions and 6 deletions

View File

@@ -14,6 +14,19 @@
$("#tags, #search_name, #search_name_matches, #query").trigger("focus").selectEnd();
e.preventDefault();
});
if ($("#image").length) {
$(document).bind("keypress", "shift+e", function(e) {
if (!$("#edit-dialog").length) {
$("#edit").show();
$("#comments").hide();
$("#share").hide();
$("#related-tags-container").show();
Danbooru.Post.open_edit_dialog();
}
e.preventDefault();
});
}
}
Danbooru.Shortcuts.nav_scroll_down = function() {