question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

stop() not working

See original GitHub issue

I am running Visibility on Angular 1.5

It starts ok, but when i try to stop it, it just won’t work.

if ($rootScope.hdRTimerId != undefined) Visibility.stop($rootScope.hdRTimerId);

This is how i am trying to stop it.

I am saving the id in the root scope so i don’t lose it with page transitions, i won’t have a problem because i am only using Visibility on 1 page, when i get back to the page, i try to run stop if the Id is set.

But it wont work and the callback is fired anyway 😦

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
aicommented, Aug 30, 2018

I am a user for years hahaha

Thanks 😄

0reactions
zorkindcommented, Aug 30, 2018

Ohhh i think i know what’s going on. It is probably reloading the JS when i am switching pages, making all counters go back to zero. So it has nothing to stop. But the SetInterval is still alive in the LIMBO 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

jquery .stop() not working - Stack Overflow
I'm trying to build a menu where only the first item is shown by default, and when you hover over it the rest...
Read more >
.stop() | jQuery API Documentation
When .stop() is called on an element, the currently-running animation (if any) is immediately stopped. If, for instance, an element is being hidden...
Read more >
Window.stop() - Web APIs - MDN Web Docs
The window.stop() stops further resource loading in the current browsing context, equivalent to the stop button in the browser.
Read more >
Play/Pause and stop media keys not working
Play/Pause and stop media keys not working. Hi everyone,. So I've got a weird problem, and I haven't found anyone else with the...
Read more >
Window stop() Method - W3Schools
The stop() method is the same as clicking stop in the browser. Note. The stop() method can be used to stop loading an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found