Unlike the other cases where we do this sort of offset calculation,
we're working with a message which is not msg_list.selected_id() --
which means that this message might not actually be rendered at all.
Correct for this by just letting then_select_offset stay undefined in
that case.
(imported from commit ebb8a23bf34c52f9495aa88ceca8eb4458d50be1)
This works down to about 330px height, and is probably about the
best you can do with current browsers in pure CSS.
See also: http://caniuse.com/#feat=viewport-units
Trac #786, Trac #1416
(imported from commit eeb931bb34aa6414fdf1b61db68c6aede1808a58)
When it's not offering any other suggestions, suggesting what
you've typed is unnecessary and confusing and it should just
hide completely instead.
Trac #1476
(imported from commit ff69bb53c661e0a3a193dbddde6e7a4ff8b10031)
This seems to have been somehow introduced in the refactoring to move
the popovers into their own file
(36ad3c61e4d7eb05751f9b886d15edceab656d71).
(imported from commit f5f58844a9c2da4b4433489be1772263f3aba350)
I feel bad about this commit because it really only exists
to fix a math error elsewhere -- it's basically a hacky solution
to Trac #1426 that doesn't involve actually fixing the math
that exists in the app somewhere, but instead makes our app
conform to that math.
(imported from commit ad43bf9440b80fd768c5fa1cbe5cb4a683415c02)
This fix also cleans up the search operators so that @-mentions
and Private messages have a more similar naming convention.
(imported from commit fb1a2119aab5aa9e179c6e321a8d2ef2e90290cf)
This scrolling behavior is driving me crazy on staging.
Reverting until we come up with a better alternative.
This reverts commit 41954fecd9efb43820ed1ccb5210283c17752f51.
(imported from commit 2db602cf51ca734b00ec1bd454c39204468fa024)
This is one case I forgot from the last commit. For example, if the
message actions popover is open, and you open the user sidebar popover,
the message actions popover should close. It now does.
(imported from commit a241634cb1aabf8883cf95ebd5b8ba96f5ed9908)
A cleaner, more general solution would be nice but this fixes at least
the most obvious cases for now.
(imported from commit fc7260e25a4f2172eee74af9c2d9384898947ad3)
This was mistakenly included from a previous iteration of the do_deactivate()
function's interface.
(imported from commit 0a6ddc5ba1dfe944f2cc0087c590046da6a73531)
Previously the viewport.scrollTop() command that we ran in this case
would actually scroll far off the bottom of the site; it only did
something that looked reasonable because bottom_whitespace was small
and thus the scroll was truncated.
This version scrolls to 10% of the viewport away from the top. We may
need to tweak that to instead be a fixed number of pixels or something.
(imported from commit 0176bf6e3662dfa24887f41b110b429bd8054cb0)
Previously the code to save/restore the scroll position when toggling
a stream in/out of the home view would only work if you were currently
not in the home tab -- because you used to only be able to do this
from other pages.
(imported from commit 4002a3980dfd87dabd570abee3ebc63417a78cc5)
Previously, we had some ugly complicated logic through which we
attempted to keep the selected message on screen when prepending
messages, but we didn't actually preserve the scroll position -- the
selected message would jump on the screen. This fixes that, by just
saving/restoring the scroll position of the selected message.
This perhaps makes our model/view split even less clear, but at least
it's correct.
(imported from commit 0a01450bbbcdf1b45c891d0570c9fcfb11769315)
message_list.prepend() now actually only rerenders the new messages
when prepending using the where="top" functionality (previously it
would erroneously just adjust the message database and then wait for
message_list.append() to call _maybe_rerender(), determine that things
are awry, and rerender the whole message list).
(imported from commit c64b7b540a4f5332ad792de0fad9f20750e6db1c)