closed as off-topic by glls, Ratan Paul, Martin Lezer, Raul, Himanshu Oct 27 '17 at 12:35
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions on problems in code you've written must describe the specific problem and include valid code to reproduce it. For help writing short, self-contained syntactically-valid examples, see: SSCCE.org" – glls, Ratan Paul, Martin Lezer, Raul, Himanshu
In order to set the focus you will need to access the component using it's id -
<lightning:button aura:id="button1" label="button1"/>
Find the button component by calling cmp.find("button1") in your client-side controller, where cmp is a reference to the component containing the button.
Note: This example uses a button but you can do it on input field as well and you need to do that in init which is page initiation.