I have a
<lightning:inputField aura:id="inputField1"> in a modal window, and I want to focus on this field when the modal opens, so that the user doesn't have to use their mouse or tab to set focus.
However, when I try to set focus like this:
cmp.find("inputField1").focus(), it throws an error saying that
focus() is not a function. This does work, however, with
I assume this is how Salesforce is using the Locker (or Proxy) to create elements, and it's not giving me a reference to the actual input element (maybe for security concerns in Communities or Portals).
Can anyone think of a way to set focus on this field?