Deactivate widget when not displayed and prevent a new round of events getting added to the event queue every time the page is loaded.