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

Spinner arrow keys not working #743

Closed
niboc opened this issue Jan 15, 2019 · 0 comments
Closed

Spinner arrow keys not working #743

niboc opened this issue Jan 15, 2019 · 0 comments
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@niboc
Copy link

niboc commented Jan 15, 2019

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

[x] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

When I try to spin with arrow keys, it shows NaN value.
I saw in the code that you lacked to pass the parameter of the original event.
So, here is the FIX.

{
   key: "onInputKeyDown",
   value: function onInputKeyDown(event) {
     if (event.which === 38) {
       this.spin(event, 1);
       event.preventDefault();
     } else if (event.which === 40) {
       this.spin(event, -1);
       event.preventDefault();
     }
   }
}
@cagataycivici cagataycivici self-assigned this Jan 22, 2019
@cagataycivici cagataycivici added the Type: Bug Issue contains a defect related to a specific component. label Jan 22, 2019
@cagataycivici cagataycivici added this to the 3.0.0-Final milestone Jan 22, 2019
@cagataycivici cagataycivici changed the title Spinner "onInputKeyDown" (Up-Down) not working - FIXED Spinner "onInputKeyDown" (Up-Down) not working Jan 22, 2019
@cagataycivici cagataycivici changed the title Spinner "onInputKeyDown" (Up-Down) not working Spinner keys not working Jan 22, 2019
@cagataycivici cagataycivici changed the title Spinner keys not working Spinner arrow keys not working Jan 22, 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 defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

2 participants