I have an app with an iframe. The iframe is used because I send the user to a cashier and the journey then moves away to other pages dependent on the payment option.
The iframe works fine and stays within my app when run from safari on the iphone. But if I run the same code from a link on the home screen (where it behaves more like an app) a link within the iframe opens a new safari window and does not carry any of the cookies so the user is essentially logged out.
Code for the panel is as follows:
Code:
Ext.define('mobile.view.iframePanelDyn', { extend: 'Ext.Component',
xtype: 'iframepaneldyn',
config: {
listeners: {
loadpage: function(page) {
this.element.setHtml('');
Ext.DomHelper.append(this.element, {
tag: 'div',
style: 'width: 100%; height:100%; overflow:auto; -webkit-overflow-scrolling : touch; scrolling: no;',
children: [{
tag: 'iframe',
src: mobile.config.Config.getUrlPage()+page,
id: this.id + '-iframe',
style: 'width: 100%; height:100%; overflow:auto; -webkit-overflow-scrolling : touch; '
}]
});
},
},
},
});
loaded when the user goes to the tab like this:
Code:
Ext.getCmp('cashieriframe').fireEvent('loadpage','cashieroptions');