apache / apache/cordova-plugin-inappbrowser

The beforeload: 'get' breaks the mailtos on Android and Ios

Open
#745 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.1k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

# Bug Report

## Problem

The option beforeLoad = get in the creation of the inAppBrowser makes it impossible to open mailtos.

### What is expected to happen?

Open the mailto

### What does actually happen?

Nothing, fails and doesnt open the mailto.

## Information

### Command or Code

I have created a clean application with ionic where the error can be reproduced.
https://github.com/edbusquets/test-mailto-in-app-browser

You can see the difference between the options.
And if you first open an inAppBrowser with beforeLoad = get and then one without beforeLoad this second won't work either.

public openWithCordovaBrowserBlank(url: string) {

let target = '_blank';
this.iabs.create(url, target, {
location: 'no',
hidenavigationbuttons: 'yes',
closebuttoncaption: 'Cancelar',
beforeload: 'get'
});
}

### Environment, Platform, Device

Android and Ios

### Version information

## Checklist

- [x] I searched for existing GitHub issues
- [ ] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above

Contributor guide

Open the contributing guide

Research direction

Start with the linked clean Ionic reproduction and compare the InAppBrowser behavior with beforeload set to get against the option without beforeload on Android and iOS. Reproduce the sequence where the first browser uses beforeload=get, then verify that mailto links open both initially and in a subsequent InAppBrowser.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, javascript, objective-c
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.