Merge pull request #2142 from fabrixxm/issue_1920
Fix contact popup with tinyMCE
This commit is contained in:
commit
4e725c3699
1 changed files with 30 additions and 29 deletions
|
@ -23,18 +23,19 @@ function ACPopup(elm,backend_url){
|
||||||
var h = 130;
|
var h = 130;
|
||||||
|
|
||||||
|
|
||||||
if(typeof elm.editorId == "undefined") {
|
if(tinyMCE.activeEditor == null) {
|
||||||
style = $(elm).offset();
|
style = $(elm).offset();
|
||||||
w = $(elm).width();
|
w = $(elm).width();
|
||||||
h = $(elm).height();
|
h = $(elm).height();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var container = elm.getContainer();
|
// I can't find an "official" way to get the element who get all
|
||||||
if(typeof container != "undefined") {
|
// this fraking thing that is tinyMCE.
|
||||||
style = $(container).offset();
|
// This code will broke again at some point...
|
||||||
w = $(container).width();
|
var container = $(tinyMCE.activeEditor.getContainer()).find("table");
|
||||||
h = $(container).height();
|
style = $(container).offset();
|
||||||
}
|
w = $(container).width();
|
||||||
|
h = $(container).height();
|
||||||
}
|
}
|
||||||
|
|
||||||
style.top=style.top+h;
|
style.top=style.top+h;
|
||||||
|
|
Loading…
Reference in a new issue