No Code Attached Yet J4 Issue bug
avatar brianteeman
brianteeman
10 Jul 2019

Can someone more intelligent than me confirm/deny that these doc blocks are correct

My assumption from the doc block is that multiselect would allow me to click on row1 and the shift click on row8 and that would select all rows 1 though 8.

updated: Checked in joomla 3 and my assumption was correct - its just not working in j4

* JavaScript behavior to allow shift select in grids

* JavaScript behavior to allow shift select in administrator grids

I can see that there is a event for the shift key in the js but it doesnt do what I expected

// We will prevent selecting text to prevent artifacts
if (event.shiftKey) {
document.body.style['-webkit-user-select'] = 'none';
document.body.style['-moz-user-select'] = 'none';
document.body.style['-ms-user-select'] = 'none';
document.body.style['user-select'] = 'none';

avatar brianteeman brianteeman - open - 10 Jul 2019
avatar joomla-cms-bot joomla-cms-bot - change - 10 Jul 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 10 Jul 2019
avatar brianteeman brianteeman - change - 10 Jul 2019
Title
[4.0] Behavior.multiselect
[4.0] Behavior.multiselect [js] [regression]
avatar brianteeman brianteeman - edited - 10 Jul 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 11 Jul 2019
Labels Added: J4 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 11 Jul 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 11 Jul 2019
Status New Discussion
avatar dgrammatiko
dgrammatiko - comment - 13 Jul 2019

Probably a binding is missing in the constructor, eg:
this.onRowClick = this.onRowClick.bind(this);

avatar brianteeman
brianteeman - comment - 13 Jul 2019

js is all greek to me - i am just reporting

avatar brianteeman
brianteeman - comment - 13 Dec 2019

Sorry I tried to understand the js to fix this but it's still all greek to me

avatar infograf768
infograf768 - comment - 13 Apr 2021

this.onRowClick = this.onRowClick.bind(this); is present in multiselect.js

avatar Fedik
Fedik - comment - 7 Jan 2022

It seems that while migration from jquery, this part of code was lost:

if (e.shiftKey && $last.length) {
isChecked = $current.is(':checked');
lastIndex = $boxes.index($last);
currentIndex = $boxes.index($current);
if (currentIndex < lastIndex) {
// handle selection from bottom up
swap = lastIndex;
lastIndex = currentIndex;
currentIndex = swap;
}
$boxes.slice(lastIndex, currentIndex + 1).attr('checked', isChecked);
}

avatar richard67
richard67 - comment - 26 Mar 2022

Hmm to me it seems multiselect is broken at least in 4.2, it not also on 4.1 (not tested yet). See my comment here: #37379 (comment)

On 3.10.6 it works.

Update: Just read the issue completely and so I can just confirm it.

avatar Hackwar Hackwar - change - 19 Feb 2023
Labels Added: No Code Attached Yet bug
Removed: ?
avatar Hackwar Hackwar - labeled - 19 Feb 2023
avatar Fedik Fedik - close - 10 Nov 2023
avatar Fedik
Fedik - comment - 10 Nov 2023

Please test #42330

avatar Fedik Fedik - change - 10 Nov 2023
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2023-11-10 14:46:02
Closed_By Fedik

Add a Comment

Login with GitHub to post a comment