wordpress - form window position

hi I changed this in event-calendar-scheduler\codebase\dhtmlxscheduler.js
so that on click the detail form opens on the same position as click was made.

i has a problem that i needed to have big height (1300px+) and in some browsers (chrome at least) the position of the form subwindow was in the middle of the screen, so many users didnt understand they have to scroll to see it…

the change is in return top: B.scrollTop,

i just tried this, maybe there is different smarter solution, but this works.

function getOffsetRect(D) {
var G = D.getBoundingClientRect();
var H = document.body;
var B = document.documentElement;

return {
top: B.scrollTop,
left: Math.round©
}
}

  • had to add this… to be honest i have no idea what am i doing, but it works… :unamused:
    If someone could help out with some logical explanation, or other solution…

function getOffsetSum(A) {
var C = 0,
B = 0;
Q = A.getBoundingClientRect().top;
while (A) {
C = C + parseInt(A.offsetTop);
B = B + parseInt(A.offsetLeft);
A = A.offsetParent
}
return {
top: C-Q-250,
left: B
}
}

Hello,

Sorry, didn’t quite get the problem.

So you’ve made a change:

Which caused some problems and you fixed them:

Now even before asking why you had to do the first change maybe it’s better to leave it while it still works? :slight_smile:

Kind regards,
Ilya