The window.open issue is a real problem for smart phones. For the record: window.open() fails on an iPhone because of Safari's popup blocker functionality. It works if you disable it in Safari's settings on the iPhone. It's highly doubtful that folks will have popup blocking disabled.
I took your above code to fix my problem, thanks for it. I don't have a secondary window opening up, but that may be because I only have one element in my page accessing the hidden link. Sorry that I can't help you with that.
For posterity, here's the fix:
First, put a hidden link tag in your index.html page:
Code:
<body>....
<!-- Goofy hack to get around pop-up blocking in smart phones. -->
<a href="" target="_blank" id="hidden_link" style="display:none;"></a>
....
I created a function in app.js like so:
Code:
openLinkInNewWindow: function(url){
//awful hack to avoid pop-up blocking by smart phone browser.
var link = Ext.getDom('hidden_link'),
clickevent = document.createEvent('Event');
link.href = url;
clickevent.initEvent('click', true, false);
link.dispatchEvent(clickevent);
}
then call it from my various panels like so:
Code:
....
defaults:{xtype:'button',ui:'plain',iconAlign:'left',style:'color:white'},
items:[
{
text:'View Website',
icon:'public/resources/images/web_ico.jpg',
handler: function() {
MyApp.openLinkInNewWindow(this.record.get('website'));
},
scope:this
},....