This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients ezio.melotti, georg.brandl, ned.deily, orsenthil, terry.reedy
Date 2013-10-13.15:08:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1381676891.06.0.254250499411.issue4965@psf.upfronthosting.co.za>
In-reply-to
Content
> One minor nit: when I close the sidebar, then scroll and then reopen
> it, it does not immediately update the sidebar position, only when
> scrolling again.

I'll look into it.

> You said you made it a bit more efficient; is this python-specific
> or can it be ported back to Sphinx?

Some could be backported:
 * $('.sphinxsidebarwrapper'), $(window), and $('.sphinxsidebar') are re-evaluated every time the user scrolls. In sidebar.js I already had references to these, so I reused them; in Sphinx you can move them outside the .scroll();
 * The original code used $(window).innerHeight(), but the code in sidebar.js used window.innerHeight if available or $(window).height() if not.  I kept the latter, however I'm not sure that is the best option;
 * $(document) and sidebar_height could also be calculated once at the beginning, since they shouldn't change, but I haven't done it in my patch;
 * In the patch I also renamed a few variables to be more clear;
 * The fix in #4711 could also be backported.
History
Date User Action Args
2013-10-13 15:08:11ezio.melottisetrecipients: + ezio.melotti, georg.brandl, terry.reedy, orsenthil, ned.deily
2013-10-13 15:08:11ezio.melottisetmessageid: <1381676891.06.0.254250499411.issue4965@psf.upfronthosting.co.za>
2013-10-13 15:08:11ezio.melottilinkissue4965 messages
2013-10-13 15:08:10ezio.melotticreate