Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PickList: DoubleClick on list item does not move item every item #14622

Open
Sankey1506 opened this issue Jan 24, 2024 · 8 comments
Open

PickList: DoubleClick on list item does not move item every item #14622

Sankey1506 opened this issue Jan 24, 2024 · 8 comments
Assignees
Labels
Status: Discussion Issue or pull request needs to be discussed by Core Team Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Sankey1506
Copy link

Describe the bug

On double click of picklist item in source does not move the item to destination and vice-versa.
It seems to be working till version 17.3.0 and broken afterwards.

Environment

Can be produced on https://primeng.org/picklist with v17.3.3

Reproducer

No response

Angular version

17.1.0

PrimeNG version

17.3.3

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

v20.11.0

Browser(s)

Chrome 120

Steps to reproduce the behavior

  1. Go to https://primeng.org/picklist
  2. Double click on item of source list.

Expected behavior

Item should be move to destination

@Sankey1506 Sankey1506 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 24, 2024
@mehmetcetin01140 mehmetcetin01140 self-assigned this Jan 31, 2024
@mehmetcetin01140 mehmetcetin01140 added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 31, 2024
@mehmetcetin01140 mehmetcetin01140 added this to the 17.5.0 milestone Jan 31, 2024
@cetincakiroglu
Copy link
Contributor

Hi,

After conducting research, we have discovered that the issue you mentioned is not specific to version 17, but rather a problem that exists in all versions. This issue is also present in other Prime libraries (PrimeVue & PrimeReact). The source of the problem lies in using mousedown, click, and double click events simultaneously. If a double click is performed on an element that has not been clicked before, it appears that the element does not move. On the other hand, the only way to make this feature work is to first click and then double click, but this does not always give the correct result. Due to technical limitations, it does not seem possible to solve this issue in the upcoming release. Since this issue affects all Prime libraries, we need to collaborate with other teams to come up with a general solution and reassess this feature. We cannot provide a definite answer regarding how long this solution will take. Therefore, I am moving this issue to the 17.Future milestone.

Great catch and thanks for reporting the issue!

@cetincakiroglu cetincakiroglu modified the milestones: 17.5.0, 17.Future Feb 1, 2024
@cetincakiroglu cetincakiroglu added the Status: Discussion Issue or pull request needs to be discussed by Core Team label Feb 1, 2024
@Da13Harris
Copy link

@cetincakiroglu

we have discovered that the issue you mentioned is not specific to version 17, but rather a problem that exists in all versions.

While the code may imply that this problem existed before version 17, the double-click behavior definitely worked much better in v16.0.2. We have a use-case in production where this behavior was used consistently for years and now it doesn't work.

I recommend spinning up a v16 version for comparison and try double-clicking. I think you might be surprised by the difference in behavior.

@Da13Harris
Copy link

It also works quite well here...
https://www.primefaces.org/primeng-v16-lts/picklist

@freefast
Copy link

freefast commented Apr 2, 2024

metaKeySelection="false" solved this issue for me.

@cwatzl
Copy link

cwatzl commented Jul 4, 2024

I can confirm this worked better in previous versions. I am getting customer complaints that this feature stopped working properly after upgrading from v15 to v17.

@cwatzl
Copy link

cwatzl commented Jul 4, 2024

metaKeySelection="false" solved this issue for me.

This didn't do anything for me

@MichaelChambers
Copy link

MichaelChambers commented Aug 17, 2024

I would like to add in that for PrimeVue, the double click issue starts with 3.45.0, and is likely related to that also being the first release where the user can click to select more than one node (without using Ctrl). I can click a row which selects it. Then if I double click a different row, the first one I selected is the one that gets moved, not the row I double-clicked. I am staying on 3.44.0 to avoid the issue.
A workaround might be to let us have a property to prevent users from selecting more than one row at a time. If it knows it can force single-selection, then in theory any click could deselect a previously clicked row like it seems to do in 3.44.0 and then the double-click could work on the correct row. I'd be happy to use such a single-selection-only property when instantiating my component.

@Draftscode
Copy link

We are waiting for this to be fixed as well. It should not matter what items are selected, if the user double clicks on an item, it should move that item. If there is a need for a multi-selectable double-click, make it configurable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Discussion Issue or pull request needs to be discussed by Core Team Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

8 participants