-
3 Aug 2012 3:50 AM #1
Answered: Scroll on initial tab fails (ST2.0)
Answered: Scroll on initial tab fails (ST2.0)
Hi guys
I have a strange problem with a 3 tabbed tabpanel (image below)
Screen shot 2012-08-03 at 1.45.27 PM.png
When the app loads, I cannot scroll - it merely bounce back to the original position
When going to the Settings tab, then going back to the Schedule tab, it scrolls...
&Code:var schedule = Ext.create('Ext.DataView', { itemTpl: tpl, store: offlineStore, scrollable: true, scroll: 'vertical', itemCls: 'movie-entry', ...
Anyone have ideas?Code:Ext.create('Ext.tab.Panel', { defaults: { layout: 'fit' }, fullscreen: true, tabBarPosition: 'bottom', items: [ { title: 'Schedule', iconCls: 'bookmarks', items: [ toolbar_schedule, schedule ], listeners: { painted: function() { ...
-
Best Answer Posted by riyaad
Hi Douglas Mbiandou
Sorry should have mentioned that I've already found a work around. The initial code was all placed in the index.html file. I then separated the code to index.html & app.js. The index.html file should still (for some unknown reason) have the following code in it.
Code:<script type="text/javascript"> //document.write hack, this area must NOT be empty! </script
The actual problem was the location of the document.write which the app didn't quite like.
Regards
R
-
3 Aug 2012 4:55 AM #2
Okay ... found the problem
Okay ... found the problem
Was actually an issue with the CSS file selector ...
Is there a more elegant way of doing this?Code:var isiPad = navigator.userAgent.match(/iPad/i) != null; var isiPhone = navigator.userAgent.match(/iPhone/i) != null; var isiPod = navigator.userAgent.match(/iPod/i) != null; var isApple = navigator.userAgent.match(/Mac OS X/i) != null; var isBlackBerry = navigator.userAgent.match(/BlackBerry/i) != null; var isAndroid = navigator.userAgent.match(/Android/i) != null; if (isApple || isiPad || isiPhone) { cssfile = "apple.css" } else if (isAndroid) { cssfile = "android.css" } else if (isBlackBerry) { cssfile = "bb6.css" } else { cssfile = "sencha-touch.css" } document.write('<link href="../lib.2/resources/css/' + cssfile + '" rel="stylesheet" type="text/css" />');
-
7 Aug 2012 4:17 AM #3
Please riyaad tell us where is this code.
-
7 Aug 2012 4:28 AM #4
Solution...
Solution...
Hi Douglas Mbiandou
Sorry should have mentioned that I've already found a work around. The initial code was all placed in the index.html file. I then separated the code to index.html & app.js. The index.html file should still (for some unknown reason) have the following code in it.
Code:<script type="text/javascript"> //document.write hack, this area must NOT be empty! </script
The actual problem was the location of the document.write which the app didn't quite like.
Regards
R


Reply With Quote