diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-02-22 19:31:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-22 19:31:34 +0100 |
commit | fc4b5fc1e948cc80d553fe7271c290aafe53e372 (patch) | |
tree | c5f1523cad5b71afb8dd02774d3b54a007cbb326 | |
parent | 87fc74841efb8c05602ac570f4990c091f7cb06d (diff) | |
parent | abcbea3eac9f2ec4bcb9b8b318d67728423092c9 (diff) | |
download | nextcloud-server-fc4b5fc1e948cc80d553fe7271c290aafe53e372.tar.gz nextcloud-server-fc4b5fc1e948cc80d553fe7271c290aafe53e372.zip |
Merge pull request #43556 from nextcloud/fix/42364/allow-multi-select-for-files-when-clicking-checkbox
-rw-r--r-- | apps/files/js/filelist.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 1924cd9538e..55608ada266 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -396,7 +396,7 @@ self.do_delete(filename, directory); }); - this.$fileList.on('change', 'td.selection>.selectCheckBox', _.bind(this._onClickFileCheckbox, this)); + this.$fileList.on('click', 'td.selection', _.bind(this._onClickFileCheckbox, this)); this.$fileList.on('mouseover', 'td.selection', _.bind(this._onMouseOverCheckbox, this)); this.$el.on('show', _.bind(this._onShow, this)); this.$el.on('urlChanged', _.bind(this._onUrlChanged, this)); @@ -944,8 +944,10 @@ * Event handler for when clicking on a file's checkbox */ _onClickFileCheckbox: function(e) { + // to prevent double click, prevent default + e.preventDefault() var $tr = $(e.target).closest('tr'); - if(this._getCurrentSelectionMode() === 'range') { + if(this._allowSelection && e.shiftKey) { this._selectRange($tr); } else { this._selectSingle($tr); |