Search code examples
javascriptpebble-watchpebble-sdkcloudpebble

pebble.js blank page when back is pressed


i wrote a pebble.js app, basically it shows a splash screen and a menu showing bus stops. when the user press select button on a menu item a "card" is showed with the arrival info.

however, sometimes menu items are not showed correctly (some menu items disappearing) and when i press back in the menu screen instead of closing the app a blank "page" is showed.

i dont know what i'm doing wrong. i was thinking of memory leaks but honestly i dont know...

heres the source in case someone kind wants to help me : http://pastebin.com/92xbVs2F


Solution

  • This is now fixed in Pebble.js. Your app is magically fixed as well since it was pushed to CloudPebble.

    If you'd like to know the technical details, it's because Menu Layer in the C API is normally not allowed to override the back button. As a work around, Pebble.js is currently using a blank window to catch the back button, but this hack only works if the menu is not the root window of your application. The fixed version no longer uses a blank window to catch the back button and overrides the back button in an obtuse way.