Loading htdocs/js/mahara.js +9 −2 Original line number Diff line number Diff line Loading @@ -611,11 +611,18 @@ function contextualHelpPosition(container) { */ function ensureHelpIsOnScreen(container, position) { var screenheight = $j(window).height(); var containerheight = container.height(); if (position.y + containerheight > screenheight + $j('html').scrollTop()) { var containerheight = $j(container).height(); var scrolltop = $j('html').scrollTop(); if (position.y + containerheight > screenheight + scrolltop) { position.y -= containerheight - 18; container.css('top', position.y); } // If the popup's begin outside the screen, put it at top. var offsettop = $j(container).offset().top; if (offsettop < 0) { position.y += -offsettop + scrolltop; $j(container).css('top', position.y); } } /* Only works in non-ie at the moment. Using 'document' as the element Loading Loading
htdocs/js/mahara.js +9 −2 Original line number Diff line number Diff line Loading @@ -611,11 +611,18 @@ function contextualHelpPosition(container) { */ function ensureHelpIsOnScreen(container, position) { var screenheight = $j(window).height(); var containerheight = container.height(); if (position.y + containerheight > screenheight + $j('html').scrollTop()) { var containerheight = $j(container).height(); var scrolltop = $j('html').scrollTop(); if (position.y + containerheight > screenheight + scrolltop) { position.y -= containerheight - 18; container.css('top', position.y); } // If the popup's begin outside the screen, put it at top. var offsettop = $j(container).offset().top; if (offsettop < 0) { position.y += -offsettop + scrolltop; $j(container).css('top', position.y); } } /* Only works in non-ie at the moment. Using 'document' as the element Loading