You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by manucorporat <gi...@git.apache.org> on 2016/09/20 17:15:01 UTC
[GitHub] cordova-plugin-wkwebview-engine pull request #20: Fix handling of tel and ma...
GitHub user manucorporat opened a pull request:
https://github.com/apache/cordova-plugin-wkwebview-engine/pull/20
Fix handling of tel and mailto schemes in local file
### Platforms affected
iOS
### What does this PR do?
- WKWebview appears to do nothing when `decisionHandler(WKNavigationActionPolicyAllow);` (accepting) a request with `tel` or `mailto` if the loaded file is local.
### What testing has been done on this change?
- `<a href="tel:15555555"` and `window.open('tel:15555555')`
### Checklist
- [ ] [ICLA](http://www.apache.org/licenses/icla.txt) has been signed and submitted to secretary@apache.org.
- [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
- [ ] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
- [ ] Added automated test coverage as appropriate for this change.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/driftyco/cordova-plugin-wkwebview-engine fix-handle-tel-mailto
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-plugin-wkwebview-engine/pull/20.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #20
----
commit 40a229846d7da75876677bef717dd5dbc031993d
Author: Manu Mtz.-Almeida <ma...@gmail.com>
Date: 2016-09-13T14:22:24Z
Fix handling of tel and mailto schemes in local file
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-plugin-wkwebview-engine issue #20: Fix handling of tel and mailto sc...
Posted by shazron <gi...@git.apache.org>.
Github user shazron commented on the issue:
https://github.com/apache/cordova-plugin-wkwebview-engine/pull/20
@boboldehampsink what settings, can you clarify?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-plugin-wkwebview-engine pull request #20: Fix handling of tel and ma...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/cordova-plugin-wkwebview-engine/pull/20
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-plugin-wkwebview-engine issue #20: Fix handling of tel and mailto sc...
Posted by shazron <gi...@git.apache.org>.
Github user shazron commented on the issue:
https://github.com/apache/cordova-plugin-wkwebview-engine/pull/20
No repro.
Steps:
```
cordova create test test test
cd test
cordova platform add ios
cordova plugin add cordova-plugin-wkwebview-engine
```
Edit `test/www/index.html`, add these tags:
```
<br />
<a href='tel:15551234'>TEL</a><br />
<a href='mailto:name@example.com'>MAILTO</a><br />
```
Then:
```
cordova build
cordova run --device
```
On the device, when I press either the `tel` or `mailto` links, it launches the Phone.app and Mail.app respectively.
Note that the default root `config.xml` in a new project has these tags:
```
<allow-intent href="tel:*" />
<allow-intent href="mailto:*" />
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-plugin-wkwebview-engine issue #20: Fix handling of tel and mailto sc...
Posted by alsorokin <gi...@git.apache.org>.
Github user alsorokin commented on the issue:
https://github.com/apache/cordova-plugin-wkwebview-engine/pull/20
Please disregard this test result. I was just testing a job and it went rogue.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-plugin-wkwebview-engine issue #20: Fix handling of tel and mailto sc...
Posted by jumplee <gi...@git.apache.org>.
Github user jumplee commented on the issue:
https://github.com/apache/cordova-plugin-wkwebview-engine/pull/20
a tag work fine;
but the location.href='tel:2233' don't work!
@shazron
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-plugin-wkwebview-engine issue #20: Fix handling of tel and mailto sc...
Posted by boboldehampsink <gi...@git.apache.org>.
Github user boboldehampsink commented on the issue:
https://github.com/apache/cordova-plugin-wkwebview-engine/pull/20
@shazron these settings:
```xml
<allow-intent href="tel:*" />
<allow-intent href="mailto:*" />
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-plugin-wkwebview-engine issue #20: Fix handling of tel and mailto sc...
Posted by shazron <gi...@git.apache.org>.
Github user shazron commented on the issue:
https://github.com/apache/cordova-plugin-wkwebview-engine/pull/20
@jumplee I'll re-test with location.href and report back
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-plugin-wkwebview-engine issue #20: Fix handling of tel and mailto sc...
Posted by cordova-qa <gi...@git.apache.org>.
Github user cordova-qa commented on the issue:
https://github.com/apache/cordova-plugin-wkwebview-engine/pull/20
Cordova CI Build has one or more failures.
**Commit** - [Link](https://github.com/apache/cordova-plugin-wkwebview-engine/pull/20/commits/40a229846d7da75876677bef717dd5dbc031993d)
**Dashboard** - [Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-wkwebview-engine-pr/3/)
0 tests run, 0 skipped, 0 failed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-plugin-wkwebview-engine issue #20: Fix handling of tel and mailto sc...
Posted by shazron <gi...@git.apache.org>.
Github user shazron commented on the issue:
https://github.com/apache/cordova-plugin-wkwebview-engine/pull/20
Ok, for location.href (say in a button tag onclick handler), it's definitely a bug when using wkwebview-engine (UIWebView is fine). For the CDVIntentAndNavigationFilter, we are passing back the navigationType, which is of type [WKNavigationType](https://developer.apple.com/reference/webkit/wknavigationtype). It looks like the enumeration is the same as [UIWebViewNavigationType](https://developer.apple.com/reference/uikit/uiwebviewnavigationtype) (which the filter uses for its logic), but not quite.
All enum integral values are the same for the two enumerations, except for [WKNavigationTypeOther](https://developer.apple.com/reference/webkit/wknavigationtype/1401930-other) which is set to -1 explicitly, while [UIWebViewNavigationTypeOther](https://developer.apple.com/reference/uikit/uiwebviewnavigationtype/1617934-other) is 5.
I'll file an issue to fix this by coercing the value explicitly to UIWebViewNavigationTypeOther when a WKNavigationTypeOther is encountered, before passing it off to the filter.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-plugin-wkwebview-engine issue #20: Fix handling of tel and mailto sc...
Posted by boboldehampsink <gi...@git.apache.org>.
Github user boboldehampsink commented on the issue:
https://github.com/apache/cordova-plugin-wkwebview-engine/pull/20
The new config.xml settings fixed this for me.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org