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

New Developer
Posts: 4
Registered: ‎11-09-2011
My Device: Bold 9900
My Carrier: Bell Mobility

Ripple not emulating PhoneGap events...

Hi there,


I'm using Ripple to test a PhoneGap application I'm building.  However, using Ripple to emulate PhoneGap events does not seem to fire them.


Using the event interface to fire the 'deviceready' event outputs the following to the console: 

PhoneGap :: fired deviceready event!


However, the code is not reacting to the event.  I have an alert firing on 'deviceready', and it fires at application startup (when the event should fire), but manually triggering it afterwards, or any other PhoneGap event (like "menubutton"), doesn't have any effect.  As such, it seems as though the PhoneGap events are indeed firing, just not when simulated by Ripple


I've searched the Ripple forums and I saw the suggestion to comment out phonegap.js (which I have tried, to no effect).


Any help would be greatly appreciated!





PS. Apologies if this is the wrong place to post this, but I have no idea where else to post about Ripple now that they have been acquired by RIM.

BlackBerry Development Advisor
Posts: 8
Registered: ‎02-08-2011
My Device: Not Specified

Re: Ripple not emulating PhoneGap events...

Hey Selosindis,


I took a peek at the Ripple code and I think you discovered a hard to find bug!


If you look here:



You can see that we are raising the event on the document object , the problem is that the event is raised the outer windows document and not your applications.


I created a bug to track this here:


We correctly find and raise the documentready event on startup:

Which explains why you see your callback get executed when refreshing.