Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #6 from dirk-thomas/master
Browse files Browse the repository at this point in the history
[FIXED JENKINS-25201] - Make console sections non-floating if the content exceed the window height
  • Loading branch information
oleg-nenashev committed Jun 10, 2017
2 parents 9e68e07 + 3d71e9c commit b310029
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -54,10 +54,12 @@ function doToggle(o)
var offsets = getoffsets(d);
var floatSection = d.childNodes[0];

if (offsets.y - window.scrollY <= 5) {
// if the height of the floatSection exceeds the window then keep it attached
// detached would make some items inaccessible
if (offsets.y - window.scrollY <= 5 && floatSection.offsetHeight <= window.innerHeight) {
if (floatSection.className != "scrollDetached") {
floatSection.className = "scrollDetached";
floatSection.style.width = d.offsetWidth;
floatSection.style.width = d.offsetWidth + "px";
}

floatSection.style["left"] = -window.scrollX + offsets.x + "px";
Expand Down

0 comments on commit b310029

Please sign in to comment.