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

Autocomplete - paste via mouse doesn't work #4397

Closed
danbanswer opened this issue Nov 8, 2017 · 2 comments
Closed

Autocomplete - paste via mouse doesn't work #4397

danbanswer opened this issue Nov 8, 2017 · 2 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@danbanswer
Copy link

To reproduce:
Go to the autocomplete demo page (https://www.primefaces.org/primeng/#/autocomplete)
Type an "a" in any of the autocomplete boxes. This works and the dropdown will show. Now copy the "a" and delete it (or cut it).
Right click and choose "Paste" - the "a" appears but the dropdown doesn't open.

If you paste via the keyboard the dropdown opens correctly.

This sounds very similar to a primefaces autocomplete bug: primefaces/primefaces#831 which has apparently been fixed. Also somewhat similar to a primeng bug in the spinner: #3970 . If it's appearing in two different components then it's very possible that it occurs in additional places.

@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Nov 17, 2017
@cagataycivici cagataycivici added this to the 5.FUTURE milestone Nov 17, 2017
@cagataycivici cagataycivici self-assigned this Nov 17, 2017
@cagataycivici cagataycivici removed this from the 5.FUTURE milestone Jan 15, 2018
@mmlitvin
Copy link

mmlitvin commented Jul 9, 2018

This is still a problem in both: Firefox and Chrome. Please provide the milestone for fixing this defect. Thank you

@mattfors
Copy link

@mmlitvin I've got a fix for this just haven't had time to make the change in prime's stuff. All it needs is an onPaste on the two input fields.

What I did for my project was to extend AutoComplete and call back into their keydown:

...
export class YourAutocompleteComponent extends AutoComplete {
  onPaste(event: ClipboardEvent) {
    this.onKeydown(event);
  }

}
...

Copy the entire @component({}) and add the onPaste event to both input fields.
(paste)="onPaste($event)"

sswebcoder added a commit to sswebcoder/primeng that referenced this issue Jul 29, 2018
@cagataycivici cagataycivici added this to the 6.1.1 milestone Aug 14, 2018
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

No branches or pull requests

4 participants