0 Replies Latest reply on Feb 9, 2015 4:34 PM by VICTOR ESPINA

    asl back button event firing twice

    VICTOR ESPINA

      Hi. I am new on SB1 development and I just created my first hybrid app. After a small round of testing and errors, the app worked perfectly, but by two issues:

       

      1. I used a "single page app" technique in which I have one main html file that contains the content div and a separate hidden div for each view in the app.  Then I use DOM manipulation to inject a view´s content in the content view.  Everything works ok, except that INPUT tags does't activate the SB1 keyboard automatically upon being focused.  I solved this by creating a custom function that manually calls the keyboard (asl.keyboard) and manually linking the INPUT tag with the function using de onFocus event.  My guess is that the problem is caused because I am injecting de HTML code in the content DIV dynamically, but I would like to be sure that is the cause.

       

      2. Whenever I load a new view, I call ask.back() function to change the image associated to the back button.  It works perfectly except that when the user press the back button, the backButtonEventHandler function get s called twice!.  I tried returning false at the end of the function with no luck.  Any ideas on how to avoid this?

       

      Thanks

       

      Victor Espina

      TM Internacional - Panama - Chile