diff --git a/demo/app.component.ts b/demo/app.component.ts index 0d1c356..91a058e 100755 --- a/demo/app.component.ts +++ b/demo/app.component.ts @@ -1,5 +1,7 @@ -import { Component } from '@angular/core'; import { Subscription } from 'rxjs'; + +import { Component } from '@angular/core'; + import { IAlbum, IEvent, Lightbox, LIGHTBOX_EVENT, LightboxConfig, LightboxEvent } from '../src'; @Component({ diff --git a/demo/app.module.ts b/demo/app.module.ts index fd43c7e..3784daa 100755 --- a/demo/app.module.ts +++ b/demo/app.module.ts @@ -1,7 +1,8 @@ import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; -import { AppComponent } from './app.component'; + import { LightboxModule } from '../src'; +import { AppComponent } from './app.component'; @NgModule({ imports: [ BrowserModule, LightboxModule ], diff --git a/package.json b/package.json index 9561dcf..39c9a49 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ngx-lightbox", - "version": "2.0.0", + "version": "2.0.1", "description": "A port >= angular5 for lightbox2", "main": "index.js", "dependencies": {}, @@ -29,7 +29,8 @@ "typescript": "3.4.5", "webpack": "^4.33.0", "zone.js": "^0.9.1", - "@angular-devkit/build-angular": "~0.800.1" + "@angular-devkit/build-angular": "~0.801.2", + "ngx-lightbox": "^2.0.0" }, "scripts": { "start": "./node_modules/.bin/ng serve", diff --git a/src/lightbox.component.ts b/src/lightbox.component.ts index a693125..252df64 100755 --- a/src/lightbox.component.ts +++ b/src/lightbox.component.ts @@ -1,3 +1,4 @@ +import { DOCUMENT } from '@angular/common'; import { AfterViewInit, Component, @@ -10,9 +11,15 @@ import { SecurityContext, ViewChild, } from '@angular/core'; -import { DOCUMENT } from '@angular/common'; import { DomSanitizer } from '@angular/platform-browser'; -import { LightboxEvent, LIGHTBOX_EVENT, IAlbum, IEvent, LightboxWindowRef } from './lightbox-event.service'; + +import { + IAlbum, + IEvent, + LIGHTBOX_EVENT, + LightboxEvent, + LightboxWindowRef, +} from './lightbox-event.service'; @Component({ template: ` diff --git a/src/lightbox.css b/src/lightbox.css index 3db1882..c524763 100644 --- a/src/lightbox.css +++ b/src/lightbox.css @@ -6,10 +6,6 @@ body:after { html.lb-disable-scrolling { overflow: hidden; - /* Position fixed required for iOS. Just putting overflow: hidden; on the body is not enough. */ - position: fixed; - height: 100vh; - width: 100vw; } .lightboxOverlay { @@ -31,6 +27,7 @@ html.lb-disable-scrolling { line-height: 0; font-weight: normal; box-sizing: content-box; + outline: none; } .lightbox .lb-image { diff --git a/yarn.lock b/yarn.lock index 87c3aa6..1a257bb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4324,6 +4324,11 @@ neo-async@^2.5.0: version "2.5.1" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.1.tgz#acb909e327b1e87ec9ef15f41b8a269512ad41ee" +ngx-lightbox@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ngx-lightbox/-/ngx-lightbox-2.0.0.tgz#c478be6e496c13e62f7db8b452433a7ff917c4e7" + integrity sha512-8Ac3ZmQzjllif9g6knZe9m/nzP4zdszFeaEimJ5apyIfVdQ7C4GaApHhSodY+a+M30N9IRlWu1k5HijKXoOCkw== + nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"