Skip to content

WIP: Added a check to compare sidebar height and viewport height and only allow fixed positioning if viewport is larger.

Nat Tarnoff requested to merge nattarnoff/gitlab-ce:fixed-sidebar into master

/cc @jschatz1

In IssuableContext:

Added two vars, one for viewport & one for sidebar height Before adding the "fixed positioning", there is a comparison. Only if the viewport is larger will it be fixed position.

Missing: Needs window.onchange to reset the viewport height value when the browser window changes. This currently works with refresh, but not resizing browser. The value likely should actually happen inside the affix.bs.affix to remain live, but I didn't locate that in the hour or so I spent on this problem.

Merge request reports