[TIMOB-26835] iOS: Unable to get call pop menu from a webView
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-04-04T13:53:43.000+0000 |
Affected Version/s | Release 8.0.0 |
Fix Version/s | Release 8.0.1 |
Components | iOS |
Labels | engSchedule, regression |
Reporter | Samir Mohammed |
Assignee | Vijay Singh |
Created | 2019-02-18T14:47:04.000+0000 |
Updated | 2019-04-04T13:53:43.000+0000 |
Description
This is a regression from 7.5.0.GA. When pressing the call me button on an application using webView the call popup is no longer shown.
*Test Code*
var win = Titanium.UI.createWindow({
backgroundColor:'white'
});
win.add(Ti.UI.createWebView({
top:20,
html:'<body><a href="tel:555-123-4567">Call me</a></body>',
handlePlatformUrl:true
}));
win.open();
*Expected result:*
Above test case should show a pop up asking the user to make a call
*Actual result:*
No pop is shown.
[~smohammed] In 8.0.0 we are using WKWebView instead of UIWebView to implement Ti.UI.WebView. So in some cases behavior is a bit different. We have to use 'allowedURLSchemes' property for same to work. Best way to implement the same is -
PR(master) - https://github.com/appcelerator/titanium_mobile/pull/10793 PR(8_0_X) - https://github.com/appcelerator/titanium_mobile/pull/10794
[~jquick], is there something similar to the
allowedURLSchemes
property andhandleurl
event on Android to dynamically decide which URLs to handle?[~jvennemann], in Titanium 7.5.0, we added a new "onlink" callback to
WebView
on Android and iOS. https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.WebView-property-onlink TheWebView
will do a blocking call on the "onlink" callback whenever you tap on a link. If you returntrue
from the callback, then theWebView
will proceed to load the URL. If the callback returnsfalse
, then theWebView
won't load the link. This feature's main intention is to allow the app developer to invoke native things from say a custom URL scheme. Such as display a native window/dialog.Here is an example on how to use "onlink". It works on both Android and iOS.
FR Passed, waiting on Jenkins builds.
Merged to 8_0_X and master
*Closing ticket.* Fix verified in SDK version
8.0.1.v20190403071846
and SDK version8.1.0.v20190325115012
. Test and other information can be found at: PR(master) - https://github.com/appcelerator/titanium_mobile/pull/10793 PR(8_0_X) - https://github.com/appcelerator/titanium_mobile/pull/10794