Comments (12)
For the example:
Which file would you load in your IAB instance and then get a blank page? Which ones would work?
Can you load the page in your normal native browser?
Which platform?
from cordova-plugin-inappbrowser.
If I tell IAB to load Default.htm, the page is blank. I'm not totally familiar with what MadCap does with their scripts, but when you open Default.htm in a normal browser, the JS in the head loads and it goes to the Home.htm page. When you direct the IAB to load Home.htm, it goes to home page but none of the dynamic elements in the page or links to other pages are working.
from cordova-plugin-inappbrowser.
I am not sure if you will get anything from IAB, but did you try to remote debug the problem and see if it can't load some URLs or there is some output in the console? https://ionic.zone/debug/remote-debug-your-app
from cordova-plugin-inappbrowser.
I know it can load external URLs like I can open wikipedia or apache.org in the IAB and they seem to work fine. Debugging is tricky though. When I run on an Android device, I can use Chrome to inspect the app as it is running, but since I launch the IAB with the _blank target, it opens in a new window and I can't use the Chrome performance tools to see what happens when the IAB initially opens. When I run my app as a Windows app, I run into a similar problem where the IAB opens but there is no way to inspect the content in the IAB from within the debugger (Visual Studio) nor anyway to see what, if any, output is being generated by IAB.
It may also be worth nothing that some things work differently depending on the target. For example, as a Windows app, the _system target does not work for me (likely due to an IT policy), the _blank target lets the hamburger menu open but there is nothing in it, and the _self target doesn't let the hamburger menu open at all.
from cordova-plugin-inappbrowser.
What host are you loading the URL from? local or remote?
from cordova-plugin-inappbrowser.
It's a local URL. I have the files at www/assets/.
from cordova-plugin-inappbrowser.
When I load the Default.htm
from the example project I am redirected to ´Content/Home.htm` - which is a pretty standard website.
What you describe sounds a bit like a problem with loading data based on a relative path or something. The "base" in the IAB might be different than when loading the file manually in the browser or something - I would try to understand that.
One way: Find out how the files that seems to be missing are loaded, add links to the same URLs to the homepage and click them. Can the file be loaded?
from cordova-plugin-inappbrowser.
Interesting...would you mind sharing your Cordova project?
from cordova-plugin-inappbrowser.
Sorry, I didn't create a Cordova project but downloaded the sample project you linked and tested in normal browser to understand what you meant.
from cordova-plugin-inappbrowser.
Alright, so I tried just placing a link to the home page from default and it was unable to navigate to the page. The path looks correct though:
I also made a bare bones example program: https://github.com/skrawn/MadCapTest This should be build-able in Visual Studio and on the command line.
from cordova-plugin-inappbrowser.
Hello skrawn
I am working on integrating MadCap flare help into an ionic-cordova project for both Android and Windows. I have the same issues.
Do you have a resolution?
Here is what I found so far:
Android:
target=_blank
url=help/Default.htm
Default.htm does not work, shows a bank page. The page doesn't redirect to Contents/Home.htm. If you open Contents/Home.htm directly then the help page is displayed but menu from hamburger menu don't navigate. This is some path issue, but I have not found the solution yet.
I am able to get the help page to display and navigate using iframe in a webview. It's a solution but I would like to use inappbrowser for both platforms.
Windows:
target=_blank
url=help/Default.htm
Default.htm and Contents/Home.htm open the help page and hamburger menu links work. The issue is in MadCap flare. You will need to unminify MadCapAll.js to make the mods. If you have MadCap software your modifying Xhr.prototype.Load function in MadCapXhr.js to evaluate document.location.prototype values equal to ms-appx: and ms-appx- web:.
prototype == 'ms-appx:' || prototype == 'ms- appx-web:'
Hope this helps.
from cordova-plugin-inappbrowser.
from cordova-plugin-inappbrowser.
Related Issues (20)
- Cookie deleted after app closes HOT 1
- Access HTTP response headers HOT 1
- Android FR: Enable zoom without displaying on-screen zoom controls
- Calling window.print() does not work
- Keychain not work with inappbrowser HOT 1
- Disable close button (Done) for iOS
- InAppBrowser does not open Youtube Links Properly HOT 12
- The preference name "MediaPlaybackRequiresUserAction" has been deprecated. It is recommended to replace this preference with "MediaTypesRequiringUserActionForPlayback."
- When can we expect latest 6.0.0 version release on npm? HOT 1
- The www/inappbrowser.css file should be removed because it was only for the Windows platform HOT 1
- Cannot build iOS Ionic Capacitor project HOT 5
- 6.0.0 Update throws error while archiving iOS project: "'Cordova/CDVWebViewProcessPoolFactory.h' file not found" HOT 1
- "browser.on('loaderror')" does not work properly on iOS.
- executeScript not working in colab HOT 4
- How to build this plugin for node_modules? HOT 2
- Add option to respect/ignore safe area on iOS
- ref.executeScript can't write clipboard HOT 5
- window.open doesnt work inside the opened webview HOT 2
- Warning when submitting to play store - JavaScript Interface Injection HOT 3
- @awesome-cordova-plugins/in-app-browser, this plugin is not sending the device id to azure while login + iOS HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-inappbrowser.