Change the offset to hold of the selected message as an offset from the
top of the screen. Then use the current offset and scrollTop to compute
the new scrollTop.
(imported from commit 718e95d3435c0f84cbb7663a9bb2bc2789314203)
We now use window.innerWidth to check for CUSTOMER7's skinny
mode, which empirically seems to be more consistent with
CSS's max-width @media settings.
I tested under FF, Safari, and Chrome.
(imported from commit d440998634633c11b471fe732104be252c979cd4)
I think we've got plenty of data of user agent strings for when this
warning triggers at this point.
(imported from commit 8bf6601a325b8e35f5127914a447bd522439c531)
We encountered a strange bug in Chrome on OSX where the initial call
to set scrollTop when the browser window loads did not do anything,
until we first scrolled to some other location on the page. This
patch "fixes" that by automatically scrolling somewhere else before
scrolling to the target place on the page.
(imported from commit 96be6a0016e9e5fd78380613c9587f38406604df)
Mark messages as read when with the pointer, but mark all messages
read if the last message is visible.
(imported from commit 4c1a928bd6966111f0f34c5207723656b5f193b9)
In a few cases the $.each was doing something imperatively that was
terser and easier to understand by using a different Underscore method,
so a few of these I rewrote.
Some code was using the fact that jQuery sets `this` in the callback to
be the item; I rewrote those to use an explicit parameter.
Some code was using $(some selector).each(callback). I converted these
to _.each($(some selector), callback).
One function, ui.process_condensing, was written to be a jQuery $.each
callback despite being in a totally different module from code using it.
I noticed this and updated the function's args.
(imported from commit bf5922a35f257c168cc09ec1d077415d6ef19a03)