Ng2-pdf-viewer: Not working on IOS on both Chrome and Safari

Created on 7 Apr 2018  路  2Comments  路  Source: VadimDez/ng2-pdf-viewer

Bug Report
- [x] Bug report

All the bellow are only available for Chrome / Safari browsers running on IOS (latest version - 11.3 ). For Android / Desktop versions, everything seems to be fine.

package.json - dependecies 
{
    "@angular/animations": "^5.2.9",
    "@angular/cdk": "^5.2.4",
    "@angular/common": "^5.2.9",
    "@angular/compiler": "^5.2.9",
    "@angular/core": "^5.2.9",
    "@angular/flex-layout": "^5.0.0-beta.14",
    "@angular/forms": "^5.2.9",
    "@angular/http": "^5.2.9",
    "@angular/material": "^5.2.4",
    "@angular/platform-browser": "^5.2.9",
    "@angular/platform-browser-dynamic": "^5.2.9",
    "@angular/router": "^5.2.9",
    "@fortawesome/fontawesome": "^1.1.5",
    "@fortawesome/fontawesome-free-brands": "^5.0.9",
    "@fortawesome/fontawesome-free-regular": "^5.0.9",
    "@fortawesome/fontawesome-free-solid": "^5.0.9",
    "classlist.js": "^1.1.20150312",
    "core-js": "^2.5.4",
    "hammerjs": "^2.0.8",
    "material-design-icons": "^3.0.1",
    "ng2-pdf-viewer": "^4.1.2",
    "player.js": "^0.1.0",
    "rxjs": "^5.5.8",
    "videogular2": "^6.0.8",
    "web-animations-js": "^2.3.1",
    "zone.js": "^0.8.25"
  }

I have an angular 5 project with angular material dependencies. When I'm importing PdfViewerModule in AppModule, this breaks Angular Material functionality on IOS devices - Chrome & Safari. Angular Material components stop working (those who use CDK Overlay - MatMenu / MatSidenav).
This happens only on IOS. On Android / Desktop everything seems to work fine.

Most helpful comment

Yeah so from what I can this library includes pdfjs which includes an animations polyfill that conflicts with web-animations.

https://github.com/mozilla/pdf.js/blob/6521d2fd941f26a1b7ae9b97f71842e49f5ff241/src/shared/compatibility.js#L571-L575)

credit goes to this guy on this stack... https://stackoverflow.com/questions/45824070/angular-4-animations-not-working-with-safari-ios-9-3

This lib needs to update to pdfjs 2 to fix this.

All 2 comments

Yeah so from what I can this library includes pdfjs which includes an animations polyfill that conflicts with web-animations.

https://github.com/mozilla/pdf.js/blob/6521d2fd941f26a1b7ae9b97f71842e49f5ff241/src/shared/compatibility.js#L571-L575)

credit goes to this guy on this stack... https://stackoverflow.com/questions/45824070/angular-4-animations-not-working-with-safari-ios-9-3

This lib needs to update to pdfjs 2 to fix this.

I was able to use the latest version of pdfjs and worked just fine. Thanks for the quick response.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Vigneshjana picture Vigneshjana  路  3Comments

kevinariasf picture kevinariasf  路  6Comments

kuba007 picture kuba007  路  3Comments

fncamm picture fncamm  路  4Comments

xmran picture xmran  路  4Comments