From e29d44dcc389fdd1c29af5ae7a196c82a9b49c78 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 26 Nov 2019 10:35:42 +0100 Subject: [PATCH] Fix so use of Ctrl+A does not scroll the list (#7020) --- CHANGELOG | 1 + program/js/list.js | 16 ++++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index f6b5608e7..16c907a7c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -14,6 +14,7 @@ CHANGELOG Roundcube Webmail - Fix bug where a new contact group added after removing all groups from addressbook wasn't added to the list - Fix bug where Ctype extension wasn't required in Installer and INSTALL file (#7049) - Fix so install-jsdeps.sh removes Bootstrap's sourceMappingURL (#7035) +- Fix so use of Ctrl+A does not scroll the list (#7020) RELEASE 1.4.1 ------------- diff --git a/program/js/list.js b/program/js/list.js index 1f0c1f402..82999de4c 100644 --- a/program/js/list.js +++ b/program/js/list.js @@ -1122,12 +1122,14 @@ select_next: function(uid) /** * Select first row */ -select_first: function(mod_key) +select_first: function(mod_key, noscroll) { var row = this.get_first_row(); if (row) { this.select_row(row, mod_key, false); - this.scrollto(row); + + if (!noscroll) + this.scrollto(row); } }, @@ -1135,12 +1137,14 @@ select_first: function(mod_key) /** * Select last row */ -select_last: function(mod_key) +select_last: function(mod_key, noscroll) { var row = this.get_last_row(); if (row) { this.select_row(row, mod_key, false); - this.scrollto(row); + + if (!noscroll) + this.scrollto(row); } }, @@ -1450,8 +1454,8 @@ key_press: function(e) case 65: // Ctrl + A if (mod_key == CONTROL_KEY && this.multiselect) { - this.select_first(); - this.select_last(SHIFT_KEY); + this.select_first(null, true); + this.select_last(SHIFT_KEY, true); return rcube_event.cancel(e); } break;