apache / apache/cordova-plugin-inappbrowser
beforeload Problem
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
# Bug Report
Added console.log() statement in 4 events (beforeload, loadstart, loadstop, loaderror)
## Problem
beforeload is called twice on first load/navigation change, then only after two every second navigation change.
### What is expected to happen?
navigation change should give following console output:
beforeloadCallBack
loadStartCallBack
loadStopCallBack
### What does actually happen?
after button click (expected):
loadStartCallBack
loadStopCallBack
after first navigation change (why beforeloadCallBack two times):
beforeloadCallBack x2
loadStopCallBack
loadStartCallBack
loadStopCallBack
next navigation change (no beforeloadCallBack):
loadStartCallBack
loadStopCallBack
next navigation change (expected):
beforeloadCallBack
loadStartCallBack
loadStopCallBack
next: (no beforeloadCallBack)
loadStartCallBack
loadStopCallBack
## Information
Link to [demo/repo](https://github.com/gehirnmitei/inappbrowser)
### Command or Code
- get repo.
- cordova prepare
- cordova run android
- click "Start Browsing" button
### Environment, Platform, Device
Android 9, Samsung Galaxy A50.
Android 7.1.1, Samsung Galaxy J5 (2016)
### Version information
cordova -v: 9.0.0 (cordova-lib@9.0.1)
cordova-android: ^8.1.0
plugins:
cordova-plugin-inappbrowser 3.1.0
cordova-plugin-whitelist 1.3.4
## Checklist
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
Contributor guide
Research direction
Reproduce the problem from the linked demo repository using cordova prepare and cordova run android, then trace the beforeload, loadstart, loadstop, and loaderror event handling in the plugin. Done means navigation consistently produces beforeloadCallBack, loadStartCallBack, and loadStopCallBack once in the expected order on the reported Android versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java, javascript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100