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

DataTable: Selection and focus loss when no custom ContextMenu is defined #3927

Closed
barthy-koeln opened this issue May 5, 2023 · 0 comments · Fixed by #3925
Closed

DataTable: Selection and focus loss when no custom ContextMenu is defined #3927

barthy-koeln opened this issue May 5, 2023 · 0 comments · Fixed by #3925
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@barthy-koeln
Copy link
Contributor

Describe the bug

When a DataTable does not use a custom ContextMenu, it still clears the user's selection.

A demonstration of the bug:
data-table-bug.webm

And with this proposed fix:
data-table-fix.webm

All custom events will work as before, but users might have to manually call the selection clear and focus methods from their own row-contextmenu listeners, which is less restrictive, but maybe a BC break.

Reproducer

https://codesandbox.io/p/sandbox/zealous-booth-efmdpx

PrimeVue version

3.28.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. Select text in the table
  2. Right-click on the text
  3. Notice the focus loss and selection loss

Expected behavior

Context menu clicks should not prevent default browser behaviour, unless you have a custom ContextMenu component attached.

@barthy-koeln barthy-koeln added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label May 5, 2023
@barthy-koeln barthy-koeln changed the title DataTable: Selection and Focus loss when no custom ContextMenu is defined DataTable: Selection and focus loss when no custom ContextMenu is defined May 5, 2023
@tugcekucukoglu tugcekucukoglu added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels May 12, 2023
@tugcekucukoglu tugcekucukoglu added this to the 3.29.1 milestone May 12, 2023
@tugcekucukoglu tugcekucukoglu self-assigned this May 12, 2023
@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add labels May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants