Display:none denies access to data such as ".left"
This commit is contained in:
Lightforger
2013-05-16 20:41:59 +03:00
parent 69d500e9f5
commit 6a6d0646bf

View File

@@ -126,9 +126,15 @@ Danbooru.Note = {
if ((new Date).getTime() < Danbooru.Note.ignore_click_until) {
return;
}
var is_hidden = document.getElementById('note-container').style.display == 'none';
// Why does toggle() not work here?
$("#note-container").toggle(is_hidden);
var $note_container = $("#note-container");
var is_hidden = ($note_container.css('visibility') === 'hidden');
if (is_hidden) {
$note_container.css('visibility', 'visible');
}
else {
$note_container.css('visibility', 'hidden');
}
}
},
@@ -473,7 +479,7 @@ Danbooru.Note = {
Danbooru.Note.new(e.pageX - offset.left, e.pageY - offset.top);
}
Danbooru.Note.TranslationMode.stop();
$("#note-container").show();
$("#note-container").css(visibility, 'visible');
e.stopPropagation();
e.preventDefault();