Wikia/app — pull request #3595 by scottrabin (2014-05-14 18:09:27+00:00)
Title: BAC-719 Trigger events on tabber tab change

Tabber offers a not-very-helpful hook system to run code after switching
tabs, but there is no guarantee on the load order of this module to
either insert hooks manually on the prototype and no way to specify the
hook at creation time (because it's automatic). Trigger a `scroll` event
because most of the things that are waiting to see if their visibility
state has changed will listen for `scroll`.

Additionally, prevent ImgLzy from thinking that just because an
element's offset values are in the right range, that it's actually
visible. It needs to not be in a `display: none` element for that to be
true. This avoids the stuttering that occurs when scrolling the page for
the first time when many galleries are embedded in a tabber that is
entirely visible; previously, it would try to load ALL of the images
(since it was only offset based), and now it makes sure the elements
aren't still hidden by Tabber.

RFCR @lizlux @macbre