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