jQuery Mobile + Phonegap = no localStorage on Windows Phone 8

jQuery Mobile + Phonegap = no localStorage on Windows Phone 8

I'm using PhoneGap 2.4.0 and jQuery Mobile 1.2.0 in a Windows Phone 8 app. 

As soon as I include jQuery Mobile I get an error when trying to use localStorage. If I remove jQeryMobile localstorage is woring just fine. Has anyone else see this behavior?

  1. //On Windows Phone 8 (Android and iOS are fine) we crash when trying to do window.localStorage.setItem
  2. console.log('PRE window.localStorage.setItem! Trying to set UserName = ' + $(data).find("UserName").text());
  3. try{
  4. window.localStorage.setItem("UserName", $(data).find("UserName").text());
  5. }
  6. catch (e){
  7. //ERROR MSG: Error: The system cannot find the file specified.\r\n
  8. console.log('ERROR MSG: ' + e);
  9. }