title: How to Focus on Input Field after Navigation
body: <p>How to focus on input field after navigating back from a child page?</p>
  
  
  
  <h3>Child Page</h3>
  
  <pre class="lang-js prettyprint-override"><code>onNavigateBtnClick: function() {
      var oHistory = History.getInstance();
      var sPreviousHash = oHistory.getPreviousHash();
      if (sPreviousHash !== undefined) {
          history.go(-1);
      } else {
          var bReplace = true;
          this.getRouter().navTo("HomePage", {}, bReplace);
      }
  },
  </code></pre>
  
  <h3>Parent Page</h3>
  
  <pre class="lang-js prettyprint-override"><code>onAfterRendering: function() {
      jQuery.sap.delayedCall(500, this, function() {
          this.getView().byId("InputField").focus();
      });
  },
  </code></pre>
  
  <h2>Problem</h2>
  
  <ol>
  <li>When the nav back button is clicked first time, the <code>onAfterRendering</code> hook is called.</li>
  <li>If I do some action on child page then click on the nav back button, the <code>onAfterRendering</code> method would not be called.</li>
  </ol>