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: No keyboard input when using the [size] attribute #1207

Closed
ClementVidal opened this issue Nov 4, 2016 · 1 comment
Closed

Spinner: No keyboard input when using the [size] attribute #1207

ClementVidal opened this issue Nov 4, 2016 · 1 comment

Comments

@ClementVidal
Copy link

p-spinner is apparently not working correctly when used with ONLY the size parameter:

With this
<p-spinner [(ngModel)]='dailyRate' min='0'></p-spinner>
everything works fine.

But with
<p-spinner [(ngModel)]='dailyRate' min='0' size='10' ></p-spinner>
the spinner do not seamns to intercept any keyboard input, only the arrows can be used.

The issue seams to come from the fact that adding the size attribute automaticly add the maxlength attribute with a value of 0 to the p-spinner underlying input HTMLElement.

One work around is to also add the maxlength attribute to the p-spinner with a value above 0.

So this:
<p-spinner [(ngModel)]='dailyRate' min='0' size='10' maxlength='10' ></p-spinner>
Solve the problem.


  • PrimeNg rc.3
  • Angular 2.1.2
@cagataycivici
Copy link
Member

Fixed at #1197

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants