make autocomplete work with updated tinymce

This commit is contained in:
friendica 2012-03-21 05:27:08 -07:00
parent 1a98f3c067
commit 3ad02a749b

View file

@ -14,22 +14,22 @@ function ACPopup(elm,backend_url){
this.kp_timer = false; this.kp_timer = false;
this.url = backend_url; this.url = backend_url;
var w = 530;
var h = 130;
if(typeof elm.editorId == "undefined") { if(typeof elm.editorId == "undefined") {
style = $(elm).offset(); style = $(elm).offset();
w = $(elm).width(); w = $(elm).width();
h = $(elm).height(); h = $(elm).height();
} }
else { else {
style = $(elm.container).offset(); var container = elm.getContainer();
w = elm.container.offsetWidth; if(typeof container != "undefined") {
h = elm.container.offsetHeight; style = $(container).offset();
// Quick fix for chrome until I get a tool to inspect the dom w = $(container).width();
// Chrome returns 0x0 h = $(container).height();
if(! w) }
w = 530;
if(! h)
h = 130;
} }
style.top=style.top+h; style.top=style.top+h;