Fix positioning of tag edit dialog box.
Bug: if you open the tag edit dialog with shift+e, close it, then open it again, it won't be vertically centered when it opens the second time. Fix: hide the related tags section *before* opening the dialog, not after. Hiding it afterwards shifts the layout, which uncenters the dialog.
This commit is contained in:
@@ -89,6 +89,8 @@ Post.open_edit_dialog = function() {
|
||||
return;
|
||||
}
|
||||
|
||||
$(document).trigger("danbooru:open-post-edit-dialog");
|
||||
|
||||
$("#edit").show();
|
||||
$("#comments").hide();
|
||||
$("#post-sections li").removeClass("active");
|
||||
@@ -149,8 +151,6 @@ Post.open_edit_dialog = function() {
|
||||
|
||||
$tag_string.css({"resize": "none", "width": "100%"});
|
||||
$tag_string.focus().selectEnd().height($tag_string[0].scrollHeight);
|
||||
|
||||
$(document).trigger("danbooru:open-post-edit-dialog");
|
||||
}
|
||||
|
||||
Post.close_edit_dialog = function(e, ui) {
|
||||
|
||||
Reference in New Issue
Block a user