xwp / wp-widget-customizer

[OBSOLETE] Widget Customizer plugin for WordPress (now merged into Core)
http://wordpress.org/plugins/widget-customizer/
54 stars 18 forks source link

Improve scrolling widget into view #56

Closed westonruter closed 10 years ago

westonruter commented 10 years ago

The current scrollIntoView is woefully inadequate.

Builds on and #5 and #13

westonruter commented 10 years ago

/cc @shaunandrews

bobbravo2 commented 10 years ago

My personal favorite is

$('html, body').animate({scrollTop: $(elem).offset().top }, 250);
westonruter commented 10 years ago

@bobbravo2 I think that is what we had initially, but I was concerned that it wouldn't work if the widget was inside of another scrolling container. The animation to scroll into view should not get invoked if the widget can already be seen. So we need logic to detect if the widget is currently in view to begin with.

westonruter commented 10 years ago

Moved to Trac: https://core.trac.wordpress.org/ticket/27358