webview.reload() bug if website has iframe(s). If website is reloaded from Safari entire site is shown.
var win = Ti.UI.createWindow();
//webview toolbar buttons
var btnBack = Ti.UI.createButton({
width: 50,title:'<',
//image: '../img/icon_arrow_left.png',
enabled: false
});
//event: back
btnBack.addEventListener('click', function(){
webView.goBack();
});
var btnFwd = Ti.UI.createButton({
width: 50,title:'>',
//image: '../img/icon_arrow_right.png',
enabled: false
});
//event: forward
btnFwd.addEventListener('click', function(){
webView.goForward();
});
var btnReload = Ti.UI.createButton({
systemButton:Titanium.UI.iPhone.SystemButton.REFRESH,
visible: false
});
//event: reload
btnReload.addEventListener('click', function(){
webView.reload();
});
var btnLoading = Ti.UI.createButton({
systemButton:Titanium.UI.iPhone.SystemButton.SPINNER,
});
var btnSpace = Titanium.UI.createButton({
systemButton:Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE
});
//webview
var webView = Ti.UI.createWebView({
url: 'http://www.borsen.dk'
});
win.add(webView);
//event: before load
webView.addEventListener('beforeload',function(e){
webViewToolbar.items = [btnBack, btnFwd, btnSpace, btnLoading, btnSpace];
});
//event: load
webView.addEventListener('load',function(e){
webViewToolbar.items = [btnBack, btnFwd, btnSpace, btnReload, btnSpace];
//ctrl: back
if(webView.canGoBack()){
btnBack.enabled = true;
} else {
btnBack.enabled = false;
}
//ctrl: fwd
if(webView.canGoForward()){
btnFwd.enabled = true;
} else {
btnFwd.enabled = false;
}
});
//webview toolbar
var webViewToolbar = Ti.UI.createToolbar({
items: [btnBack, btnFwd, btnSpace, btnReload, btnLoading, btnSpace],
bottom: 0,
barColor: win.barColor
});
win.add(webViewToolbar);
win.open();
Tested with 2.0.1GA2 on the iOS simulator, the issue is still valid. The webpage is rendered fine, however at the bottom, you will see that it is 'truncating' parts of the page.
cannot reproduce Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 iOS iPhone Simulator: iOS SDK version: 6.0
Can verify this ticket as "Cannot Reproduce". Tested with the following environment; iPhone 7 and Simulator (10.2) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.3 GA Appc NPM 4.2.8 Appc CLI 6.1.0 Ti CLI 5.0.11 Alloy 1.9.5 Arrow 1.10.1 Xcode 8.2 (8C38) Node v4.6.0 Java 1.7.0_80