X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/af71d33bb9efc38b271206c40b11e5ed8d6b62f9..367676acae770d47b9cb285a568f4349f92f07a1:/redakcja/static/js/wiki/view_editor_wysiwyg.js diff --git a/redakcja/static/js/wiki/view_editor_wysiwyg.js b/redakcja/static/js/wiki/view_editor_wysiwyg.js index 257ec252..5f450622 100644 --- a/redakcja/static/js/wiki/view_editor_wysiwyg.js +++ b/redakcja/static/js/wiki/view_editor_wysiwyg.js @@ -290,8 +290,11 @@ $box = $origin; } - var x = $box[0].offsetLeft; - var y = $box[0].offsetTop; + /* always stick to the left to avoid interfering with gallery */ + var x = 20; + var y = $origin.offset().top + $("#html-view").scrollTop(); + + var w = $box.outerWidth(); var h = $box.innerHeight(); @@ -307,7 +310,8 @@ left: x, top: y, width: w - }).appendTo($box[0].offsetParent || $box.parent()).show(); + }).appendTo($('#html-view')).show(); /* appending outside of the document structure */ + if ($origin.is('.motyw')) { $('textarea', $overlay).autocomplete('/themes', {