Ezio Melotti added the comment:

> 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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4965>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to