Position of Cursor when Starting the App

  • Doris Thanner
    Participant
      Has successfully completed the online course Basics (100)
    2 years, 12 months ago #33504

    Hello,

    when starting the App the cursor is automatically positioned in the top right corner where the selection of languages can be done. To improve our customer satisfaction we would like to set the cursor in a simple form (widget group) inside a flex box.

    Can this be done and is there a guide how to achieve this?

    Thx!

    Doris

    Doris Thanner
    Participant
      Has successfully completed the online course Basics (100)
    2 years, 11 months ago #33752
    Up
    2
    Down
    ::

    Dear all,

    we were able to find the following solution to set the focus as needed using the event onAfterShow of the respective window.

    jQuery.sap.delayedCall(500, this, function() {
    var inputLieferung = this.getView().byId(“SimpleForm_Input2Lieferung”);
    if(inputLieferung) {
    inputLieferung.focus()
    } });

     

    PS: I am aware that this code can be shortened.

     

    Enjoy!

    Vitali Kurdasov
    Moderator
      Has successfully completed the online course Intermediate (200)
      Has successfully completed the online course Basics (100)
      Has successfully completed the online course Advanced (310)
      Has successfully completed the Intermediate Certification
    2 years, 11 months ago #33555
    Up
    1
    Down
    ::

    Hi Doris,

    by changing the cursor position you mean the mouse cursor or is it the position cursor in textfields?

    If you like to change the position cursor then you can try it by changing the focus to the element you like with

    sap.ui.getCore().byId(‘ScreenId–ElementID’).focus()

    Otherwise please write us again

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.