diff --git a/js/views/attachment_view.js b/js/views/attachment_view.js index 844db9fb08c7..59f396d1329a 100644 --- a/js/views/attachment_view.js +++ b/js/views/attachment_view.js @@ -248,7 +248,7 @@ templateName: 'lightbox', className: 'modal lightbox', initialize: function() { - this.window = extension.windows.getViews()[0]; + this.window = window; this.$document = $(this.window.document); this.listener = this.onkeyup.bind(this); this.$document.on('keyup', this.listener);