Hide floating recipient bar on mousewheel scroll but not keypress.

That way it is visible more consistently when arrowing through
messages (arrowing causes scroll events).

(imported from commit ba629b907e4e593032a61a10b04f00e592fe8427)
This commit is contained in:
Jessica McKellar
2013-02-18 20:50:33 -05:00
parent 1b02928806
commit 2852692de5
2 changed files with 11 additions and 3 deletions

View File

@@ -2,6 +2,8 @@ var hotkeys = (function () {
var exports = {};
exports.in_scroll_caused_by_keypress = false;
var directional_hotkeys = {
40: rows.next_visible, // down arrow
106: rows.next_visible, // 'j'
@@ -65,6 +67,7 @@ function process_hotkey(e) {
if (directional_hotkeys.hasOwnProperty(code)) {
next_message = directional_hotkeys[code](selected_message);
if (next_message.length !== 0) {
exports.in_scroll_caused_by_keypress = true;
select_message(next_message, {then_scroll: true});
}
if ((next_message.length === 0) && (code === 40 || code === 106)) {