diff --git a/test/demo/collections/main.js b/test/demo/collections/main.js index c3a71958..cc18a064 100644 --- a/test/demo/collections/main.js +++ b/test/demo/collections/main.js @@ -98,8 +98,11 @@ this.viewer = OpenSeadragon(config); if (testInitialOpen) { - this.viewer.addHandler( "open", function() { - }); + function openHandler() { + self.viewer.removeHandler('open', openHandler); + } + + this.viewer.addHandler( "open", openHandler); } if (testMargins) {