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

KeyFilter: Paste under MacOS does not work #5147

Closed
mariuspruski opened this issue Oct 24, 2023 · 7 comments · Fixed by #6588, leoo1992/GeradorQRCode#40, mtech-31-quemistry/quemistry_client_web#3 or leoo1992/GeradorQRCode#57 · May be fixed by nhattpn/BTL_LTNC#56
Assignees
Labels
Device: Mobile Issue or pull request is *only* related to Mobile device Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@mariuspruski
Copy link

mariuspruski commented Oct 24, 2023

Describe the bug

Under MacOS (both Safari and Chrome) pasting from the clipboard via key combination is not possible when an InputText has a KeyFilter (pint in my case) configured. Pasting via the context menu works.

The issue can be reproduced on the Component Showcase: https://primereact.org/keyfilter/

Reproducer

No response

PrimeReact version

10.0.2

React version

17.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

MacOS, Safari, Chrome

Steps to reproduce the behavior

  1. Go to https://primereact.org/keyfilter/
  2. Paste a number with key combination in the different fields

Expected behavior

Copied content should be pasted.

@mariuspruski mariuspruski added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 24, 2023
@melloware
Copy link
Member

I wonder if it in IOS this line doesn't work?

const clipboard = e.clipboardData.getData('text');

@melloware
Copy link
Member

looks like it might be a Safari issue: https://developer.apple.com/forums/thread/133001

@melloware melloware added Type: Bug Issue contains a defect related to a specific component. Device: Mobile Issue or pull request is *only* related to Mobile device and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Oct 24, 2023
@mariuspruski mariuspruski changed the title KeyFilter: Paste under iOS does not work KeyFilter: Paste under MacOS does not work Oct 24, 2023
@axlerk
Copy link
Contributor

axlerk commented Apr 26, 2024

No, it's not connected with Safari, it's reproducing in Desktop Chrome as well.
Works from the keyboard only with the combination cmd+option+shift+v.

@axlerk
Copy link
Contributor

axlerk commented Apr 26, 2024

Probably something with cmd key detection. For example, Alphanumeric insertion works well.

@melloware
Copy link
Member

@axlerk PR is welcome if you figure it out!

@axlerk
Copy link
Contributor

axlerk commented Apr 28, 2024

I could try, do we have a README about how to build live showcase page like this one: https://primereact.org/keyfilter ?

@melloware
Copy link
Member

Yep just check out the code and run NPM install followed by "npm run dev" it runs the app on port 3000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment