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

p-dropdown only sets filled on click, not on select (doesn't work with keyboard) #8059

Closed
scrimothy opened this issue Aug 15, 2019 · 1 comment
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@scrimothy
Copy link

I'm submitting a ... (check one with "x")

[X] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports)
https://stackblitz.com/edit/github-xvghjz

Current behavior
If you click an option in the p-dropdown, it will set filled = true, however, if you select an option by any other means (programmatically, or with a user keyboard), filled is not changed.

Expected behavior
filled should be set to true no matter how the value gets set, not just by clicking an item.

Minimal reproduction of the problem with instructions

  1. Click (or tab and use space key) to open dropdown options overlay
  2. Use down arrow to select the option you want
  3. Use enter key to select the option
  4. See that filled is not changed, but the value is

What is the motivation / use case for changing the behavior?
If using a Material-like theme (like Ultima) which uses floating labels, if a user uses their keyboard to select an option, the label never moves out of the way of the value, so the two will overlap each other in the component.

Please tell us about your environment:
Operating system: MacOS
IDE: VS Code
package manager: NPM
HTTP server: ng serve

  • Angular version: 7.X
    still an issue in 8 (see stackblitz)

  • PrimeNG version: 7.X
    still an issue in 8 (see stackblitz)

  • Browser: all

  • Language: all

@mertsincan mertsincan self-assigned this Aug 20, 2019
@mertsincan mertsincan added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Aug 20, 2019
@mertsincan mertsincan added this to the 8.0.3 milestone Aug 20, 2019
@mertsincan
Copy link
Member

Thanks a lot for the solution!

Best regards,

JacobSiegle pushed a commit to JacobSiegle/primeng that referenced this issue Oct 2, 2019
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

2 participants