diff --git a/README.md b/README.md index 9a6c408..8809db7 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ The Background selector attribute group contains values for **_isEnabled**, **_h No known limitations. ---------------------------- -**Version number:** 2.3.10 +**Version number:** 2.3.11 **Framework versions supported:** 2+ **Author / maintainer:** DeltaNet with [contributors](https://github.com/deltanet/adapt-background-selector/graphs/contributors) **Accessibility support:** Yes diff --git a/bower.json b/bower.json index be096f9..df415a0 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-background-selector", - "version": "2.3.10", + "version": "2.3.11", "framework": ">=2", "homepage": "https://github.com/deltanet/adapt-background-selector", "issues": "https://github.com/deltanet/adapt-background-selector/issues", diff --git a/js/background-selector-videoView.js b/js/background-selector-videoView.js index 353dc5a..e748e9c 100644 --- a/js/background-selector-videoView.js +++ b/js/background-selector-videoView.js @@ -7,15 +7,14 @@ define([ className: "background-selector-video", initialize: function () { - this.render(); - this.listenTo(Adapt, { 'remove': this.remove, 'popup:opened': this.popupOpened, 'popup:closed': this.popupClosed, - 'pageView:ready': this.pageReady, 'device:resize': this.deviceResize }); + + this.render(); }, render: function () { @@ -35,15 +34,13 @@ define([ this.deviceResize(); + $(this.modelID).on('onscreen', _.bind(this.onscreen, this)); + _.delay(function() { this.popupOpened(); }.bind(this), 500); }, - pageReady: function () { - $(this.modelID).on('onscreen', _.bind(this.onscreen, this)); - }, - popupOpened: function() { if ($('body').children('.audio-prompt').css('visibility') == 'visible') { this.playVideo(false);