Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Highlighted
Developer
Posts: 79
Registered: ‎09-17-2012
My Device: Torch 9800
My Carrier: DiGi

iScroll Problems

Hi all. I have a problem trying to make iScroll work.

 

Currently I'm working on this app that is developed using Webworks, HTML5, jQuery, JavaScript, CSS and the app will cater for both touch-screen and non-touch screen devices running on OS 6 and 7.

 

The app that our team is developing lalso will need to retrieve and display lots of data so there will be lots of scrolling (both horizonal and vertical). That's when we start to bang our heads and pull our hair out. On OS 6 and 7 even if you set div to overflow: auto the scrollbars would not come out and if user try to scroll using trackpad/trackball, the scrolling won't go beyond the height or width of the scrolling div.

 

Then we discovered iScroll. It's good but another problem is, the way our app works like this:

We have one index.html

<body id="mainBody" onLoad="mainMenu()"></body>

 It will load mainMenu() where is contains the layout and navigation to other features of the app eg, function one(function one_page()), function two (function two_page()). iScroll is initalize at:

<body id="mainBody" onLoad="mainMenu()">
<script type="text/javascript">
var myScroll;
function scroll() {
	myScroll = new iScroll('wrapper',);
	
	}
document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
window.addEventListener('load', scroll, false);

</script>

 iScroll wil be displayed nicely in mainMenu() but iScroll won't display in the other functions that are called from mainMenu(). For example in mainMenu() there's a link to function displayUser(), I click on the link the iScroll won't be displayed there. Is the any solution for this problem?

 

There is also another issue, if the page displays more than 5 rows of records, the trackpad focus navigation is not working even x-blackberry-focusable="true" and there's onmouseover and onmouse event to handle focus event.  <rim:navigation mode="focus" /> also has been set in the config.xml.

 

Has anyone come across these problems? Any help would be greatly appreciated.

 

Thank you.