PDA

View Full Version : EXT JS 4 APP DOES NOT RUN IN SAFARI (IPAD)



jeromer
26 Aug 2011, 10:08 AM
Are EXTJS 4 apps runnable on IPAD with no changes? I know Sencha touch was created for mobile devices and would have no problem, but how about a plain-old EXTJS4 app. The app I wrote will run on IE, Chrome, FF but not on SAFARI (desktop browser or ipad). I thought that since it was a javascript/html app it would just run as a web app on most any browser platform. I also thought that since sencha touch and extjs shared the same code base that it would not be a problem. I also looked for a tool that would convert an EXTJS 4 app to an IPAD app, but that search was not successful (PhoneGap was the closest I got).

Any discussion or answers will be greatly appreciated. Thanks

mitchellsimoens
28 Aug 2011, 5:23 AM
Ext JS has never been targeted for mobile devices.

mankz
28 Aug 2011, 9:53 AM
There's no reason it shouldn't render at least. Interaction is another issue, which you'll not solve easily. Tried using the iPad debugger console? Any error msgs?

jeromer
29 Aug 2011, 8:41 AM
It does render the top level items in the viewport, but not the stuff inside the top level items. I see the titles of the treepanels within a panel which is within the viewport. I've included the code. I have two concerns. 1 - the app behavior in fine in Chrome, very slow in ff. In IE the itemcontext menu stretches the length of the browser window and the radio group does not work. Are these bugs or something I can do coding wise to fix? 2. If ExtJS generates just html, javascript and is compatible across browsers, why am I experiencing the above.

Ext.require([
'Ext.data.*',
'Ext.grid.*',
'Ext.tree.*',
'Ext.container.*'
]);
Ext.application({
name: 'CP',
appFolder:'app',
controllers: [
'ProductGroupTreeController',
'NonAssignedPartsController'

],
launch: function() {
Ext.QuickTips.init();
Ext.create('Ext.container.Viewport', {
layout: {type:'fit'},
id:'pTop',
items:
[

{
xtype:'panel',
layout:
{
type:'hbox',align:'stretch'
},
items:
[
{
xtype:'pgTree',title:'Product Group Parts',
flex: 1
},
{
xtype:'nonAssignedPartsView',title:'Available Products',
flex: 1
}

]
}

]
});
}
});

mitchellsimoens
29 Aug 2011, 8:57 AM
I haven't tried the contextmenu but the reason for different performance... each browser has it's own javascript (CSS etc) engine and that is where the performance difference is. Even if everything is standards based (code and browser), there will still be performance differences.

A tractor and a man with a shovel can achieve the same results but the tractor is more efficient.

man = IE
tractor = others

mankz
29 Aug 2011, 9:00 AM
Is the issue reproducible with the posted code? (use CODE tags in future :) )

jeromer
29 Aug 2011, 9:29 AM
It is not reproducible with the posted code. I would have to supply the treepanels involve. If you like I can pass entire app after I swap hard coded values for the tree stores (real data is sensitive).

I wanted to wrap in code tags but when I press reply under your response, the code tag option is not available. I think I only see the code tag option when using the large +Reply to Thread button.

jeromer
29 Aug 2011, 4:40 PM
Please forgive me for most of what I've said above. I was successful in getting an EXTJS app to run on all browsers (chrome, ff, ie, safari (desktop and IPAD). I believe my problem was 2 fold. 1) using a soft link to extjs lib. 2) using localhost in model proxy instead of the ip address of my local xampp server (ipad issue and others trying to run my app remotely). But IE is still problematic when displaying a context menu.
Thanks for your help and hints that kept me pushing forward.

mankz
29 Aug 2011, 10:52 PM
What's the issue with the context menu on IE? Can you create a simple test case with code?

jeromer
30 Aug 2011, 9:47 AM
Thanks. I've create one. How can I get it too you? It's a skeleton version of same app in this conversation. It's in MVC structure and is not just a block of code.

jeromer
1 Sep 2011, 2:25 PM
test app attached

dr_wazza29
7 Sep 2011, 4:24 AM
Hey jeromer, were you able to get the context menu working on the iPad...if so, how did you do it? I thought the iPad didn't have a right-click event?

jeromer
7 Sep 2011, 9:15 AM
Your right, no right-click on IPAD so I never got the context menu to work.