fusionbox/django-widgy — pull request #149 by gavinwahl (2013-11-09 00:10:14+00:00)
Title: better sticky shelf

Instead of manually setting the margin-top of the shelf to get it to stay with you while you scroll, use jquery fixTo to set `position: fixed` appropriately. This fixes the shelf jerkiness during scrolling in chrome.

This required adding a '.scroll' container in the shelf that receives `overflow-y: auto` for the scrollbar. This is because fixTo copies the width of its element onto another, and chrome and firefox calculate widths differently, one including the scrollbar and the other not. The .scroll container means the width of the .shelf always includes the scrollbar.

Some issues:

- view.makeSticky is weird, but I can't figure out how to trigger something after the shelf is definitely in the dom.
- since fixTo copies styles around, resizing the window is wonky and doesn't always update all the styles appropriately.