Consider the following use case:
A zone with a ZoneRefresh (located in another zone) is updated several times and then the outer zone is updated with another block.
The ZoneRefresh mixin should cleanup after itself in scenarios like this.
A patch with tests is provided.
1. [MODIFIED] zone-refresh.js - On a timer update if the zone does not exist remove the "div" element on which the updates are triggered and stop the timer.
2. [MODIFIED] ZoneRefreshTest.java - One test method added
3. [ADDED] ZoneRefreshDestroyingZones.tml - Demo page with one outer zone with a ZoneRefresh mixin that toggles between two inner zones each a with ZoneRefresh mixin.
4. [ADDED] ZoneRefreshDestroyingZones.java
5. [MODIFIED] Index.tml - Link to ZoneRefreshDestroyingZones added
The patch does not modify any public API.
This patch is also blocked by
TAP5-1867 "SeleniumTestCase.waitForElementToDisappear(String elementId) does not seem to work",
because the patch uses SeleniumTestCase.waitForElementToDisappear(String elementId).