Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

SAPUI6 Mobile Focus does not work as I expected

$
0
0

Hi All,

 

     I am new to SAPUI5, I try to implement a "set Passcode screen" on my SAPUI5 mobile application, just like "Enter Passcode" screen on iPhone.

     In this application, I need to move cursor from one text area to another text area when user enters the passcode digit, like this:Screen Shot 2014-12-18 at 12.14.04 PM.png

However, when user actually enters the digit on the first text area, the foucs() function does not show cursor on the second text area. Only the text box is selected, and the keyboard does not appear as well:

Screen Shot 2014-12-18 at 12.16.16 PM.png

Here below is my code snippet that uses focus()

onAfterRendering: function() {            $("Input").keyup(function(e) {                if($(this).val().length >= 1)                 {                     if($(this).attr("id") == "__xmlview0--a-inner")                     {                         $("#__xmlview0--b-inner").focus();                         }else if($(this).attr("id") == "__xmlview0--b-inner")                    {                        $("#__xmlview0--c-inner").focus();                     }else if($(this).attr("id") == "__xmlview0--c-inner")                     {                         $("#__xmlview0--d-inner").focus();                     }else if($(this).attr("id") == "__xmlview0--d-inner")                     {                         //do something                     }                 }                });        }

I have debugged it for really a long long time, any help would be appreciated.

PS: it works fine on Web Browser.


Viewing all articles
Browse latest Browse all 6178

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>