Webrow opened a new issue #627: "Download xyz.pdf" skipped on _system iOS
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/627
 
 
   # Bug Report
   
   ## Problem
   When opening a pdf with IAB on iOS the download screen gets skipped, instead 
have to press cancel
   
   ### What is expected to happen?
   Open the pdf in the devices default browser or pdf viewer
   (similar to [#576 
](https://github.com/apache/cordova-plugin-inappbrowser/issues/576) but in this 
case I wouldnt mind just getting the download prompt)
   
   
   
   ### What does actually happen?
   It skips the "Would you like to download xyz.pdf, and have to press cancel 
to get the prompt. 
   
   
   
   ## Information
   <!-- Include all relevant information that might help understand and 
reproduce the problem -->
   For this cordova app we load html content and bind it to a ng-bind-html. 
With an openExternalLinks filter we rewrite the <a href> tags to rewrite to 
window.open with the arguments necessary. It works, it opents the IAB, changing 
from _system to _blank actually opens the IAB, so window.open is properly 
overwritten. 
   
   
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   The html for the pdf is:
   `<div ng-bind-html="news.content | trustSce | openExternalLinks" 
class="ng-binding"><p><a 
onclick="window.open('https://thisgoestothe.com/chicken.pdf', '_system', 
'toolbar=yes,closebuttoncaption=Hoofdmenu,clearsessioncache=no,clearcache=no,fullscreen=yes,location=yes,hideurlbar=yes,beforeload=yes')"
 target="_blank" class="">Chicken pdf</a></p></div>`
   
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you 
experiencing the issue? -->
   iPhone 11 Pro Max 13.3,
   Cordova 8, 
   cordova-plugins-inappbrowser 3.2.0
   
   
   
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   Ionic V1, 
   9.0.0 ([email protected]) CLI
   platform=ios@~5.0.1
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [ ] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to