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-inputnumber infinite loop when using buttons #9888

Closed
davidediak opened this issue Feb 12, 2021 · 0 comments
Closed

p-inputnumber infinite loop when using buttons #9888

davidediak opened this issue Feb 12, 2021 · 0 comments
Assignees
Labels
LTS-FIXED-9.2.4 Fixed in PrimeNG LTS 9.2.4 LTS-FIXED-10.0.9 Fixed in PrimeNG LTS 10.0.9 Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@davidediak
Copy link
Contributor

davidediak commented Feb 12, 2021

If you have a PrimeNG PRO Support subscription please post your issue at;

https://pro.primefaces.org

where our team will respond within 4 business hours.

If you do not have a PrimeNG PRO Support subscription, fill-in the report below. Please note that
your issue will be added to the waiting list of community issues and will be reviewed on a first-come first-serve basis, as a result, the support team is unable to guarantee a specific schedule on when it will be reviewed. Thank you for your understanding.

Current Queue Time for Review
Without PRO Support: ~8-12 weeks.
With PRO Support: 1 hour

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)
Please demonstrate your case at stackblitz by using the issue template below. Issues without a test case have much less possibility to be reviewd in detail and assisted.

https://stackblitz.com/github/primefaces/primeng-issue-template

Current behavior
Given an inputnumber with buttons, if i attach a method to the onInput (same thing with ngModelChange) event and in that
method i change the disable state of the inputnumber, we have the method repeat (method of inputnumber.ts sourcecode) call itself infinitely.
seems like the mousedown event get trapped in the method.
From inputnumber.ts, this method is the culprit.

    repeat(event, interval, dir) {
        let i = interval || 500;
        this.clearTimer();
        this.timer = setTimeout(() => {
            this.repeat(event, 40, dir);
        }, i);
        this.spin(event, dir);
    }

Expected behavior
no infinite loops.

Minimal reproduction of the problem with instructions
https://stackblitz.com/edit/angular-ivy-ocoqgf?file=src/app/hello.component.ts

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • Angular version: 11.2

  • PrimeNG version: 11.2

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

  • Language: [all | TypeScript X.X | ES6/7 | ES5]

  • Node (for AoT issues): node --version =

@yigitfindikli yigitfindikli self-assigned this Feb 15, 2021
@yigitfindikli yigitfindikli added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Feb 15, 2021
@yigitfindikli yigitfindikli added this to the 11.2.3 milestone Feb 15, 2021
@yigitfindikli yigitfindikli added LTS-FIXED-10.0.8 Fixed in PrimeNG LTS 10.0.8 LTS-PORTABLE LTS-FIXED-10.0.9 Fixed in PrimeNG LTS 10.0.9 LTS-FIXED-9.2.4 Fixed in PrimeNG LTS 9.2.4 and removed LTS-FIXED-10.0.8 Fixed in PrimeNG LTS 10.0.8 LTS-PORTABLE labels Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS-FIXED-9.2.4 Fixed in PrimeNG LTS 9.2.4 LTS-FIXED-10.0.9 Fixed in PrimeNG LTS 10.0.9 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