Make clicking the box hide the popup note box in responsive mode
- This is because the note body of one note box could hide another note box - The only option to hide the note body previously was to double tap the image
This commit is contained in:
@@ -131,7 +131,7 @@ let Note = {
|
|||||||
$note_box.on(
|
$note_box.on(
|
||||||
"mouseover.danbooru mouseout.danbooru",
|
"mouseover.danbooru mouseout.danbooru",
|
||||||
function(e) {
|
function(e) {
|
||||||
if (Note.dragging) {
|
if (Note.dragging || Utility.test_max_width(660)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,12 +163,21 @@ let Note = {
|
|||||||
"click.danbooru",
|
"click.danbooru",
|
||||||
function (event) {
|
function (event) {
|
||||||
const note_id = $note_box.data("id");
|
const note_id = $note_box.data("id");
|
||||||
$(".note-box").removeClass("movable");
|
if (!Utility.test_max_width(660)) {
|
||||||
if (note_id === Note.move_id) {
|
$(".note-box").removeClass("movable");
|
||||||
Note.move_id = null;
|
if (note_id === Note.move_id) {
|
||||||
|
Note.move_id = null;
|
||||||
|
} else {
|
||||||
|
Note.move_id = note_id;
|
||||||
|
$note_box.addClass("movable");
|
||||||
|
}
|
||||||
|
} else if ($note_box.hasClass("viewing")) {
|
||||||
|
Note.Body.hide(note_id);
|
||||||
|
$note_box.removeClass("viewing");
|
||||||
} else {
|
} else {
|
||||||
Note.move_id = note_id;
|
$(".note-box").removeClass("viewing");
|
||||||
$note_box.addClass("movable");
|
Note.Body.show(note_id);
|
||||||
|
$note_box.addClass("viewing");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user