Rather than trying to keep track of whether the last thing that
happened was an input area being focused (which had all kinds of
bugs), just detect whether we're in an input area using the
appropriate jquery selector. Hopefully this has OK performance.
(imported from commit 6150692ffcb0ab9b04244c3d053b5527847ded2d)
The new version is now the only codepath that we use in order to start
a reply to a message.
(imported from commit dd28316d2640fd5fd712f326690d480b7db59c4c)
This essentially reverts commit 0d6c3e4d0a70e06b9b2f6e5830b3a9650e44441a,
though also adds support for this behavior with the 'j' key.
(imported from commit 36c51e0f6bd03c53b84abddc75097cb06fc04e16)
Previously we triggered all hotkeys on keydown. Now, if the keydown event
is in the range of a character we bail and wait for it to be handled by the
keypress function instead.
We also redefine all of the keycodes for characters to be their lowercase
versions.
(imported from commit 534199de92174c2858220abb21ce774e1ee0e1d3)
I believe we'll get this for free with the new version of
select_zephyr and our bottom_whitespace div.
(imported from commit 0d6c3e4d0a70e06b9b2f6e5830b3a9650e44441a)
It turns out it's marginally easier for us to completely handle Home
and End ourselves rather than let the browser do it, because home
scrolls to the top of the page, but it does not select the topmost
message.
With PgUp and PgDn, the default browser behavior is fine,
but it seems like PgUp on a screen where you're already
"scrolled to the top" should not be a no-op.
(imported from commit 609d639f3a4313e75e1fd6138966f15447b70f2e)
But do keep the pointer on the screen as you scroll, and smoothly
scroll all the way up to the top or all the way down to the bottom.
(imported from commit 6acad2a16339ee5eeeebd62a853000c21e4b7152)