Skip to content

timers.clearInterval doesn't work on Android #817

Closed

Description

@atanasovg

The following code doesn't clear the interval and the callback gets executed infinitely:

mV = vm.progressViewModel.get("maxValue"); // 100
    vm.progressViewModel.set("currentValue", 0);

    // create a repeating timer to jump our progress value
    t = timer.setInterval(function () {
        var cV = vm.progressViewModel.get("currentValue");
        var nV = cV + 5;
        console.log("new: " + nV + ", max: " + mV);
        if (nV >= mV) {
            console.log(">=!!!");
            timer.clearInterval(t);
        } else {
            vm.progressViewModel.set("currentValue", nV);
        }
    }, 500);

Activity

  1. self-assigned this
    on Sep 24, 2015
  2. added this to the 1.4.0 milestone on Sep 24, 2015
  3. added 2 commits that reference this issue on Sep 24, 2015
    f4a0db2
    a894895
  4. added a commit that references this issue on Sep 30, 2015
    6d82b15
  5. lock commented on Aug 30, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  6. locked and limited conversation to collaborators on Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions