function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jorg_JankeJorg_Janke 

lightning:input onblur error: Something has gone wrong. Underlying raw object [object Object] does not support property: currentTarget

In a Lightning Component, I define an input with onchange or onblur - e.g.

    <lightning:input name="timeHours" label="Hours" onblur="{!c.onTimeBlur}" />

in my controller there is:

    onTimeBlur : function(component, event, helper) {
    },

The result is:
    Something has gone wrong. Underlying raw object [object Object] does not support property: currentTarget
    Failing descriptor: {accorto$Time$controller$onTimeBlur}.
    Please try again.
So it finds the javascript method but then fails.

Works fine for the <ui:input blur="{!c.onTimeBlur}" ..../>
Best Answer chosen by Jorg_Janke
alsinan nazimalsinan nazim
Hi Jorg_Janke,

Although lightning;input supports ONBLUR, it is BETA, So you can use <ui:input> or <force:input> or HTML <input> tags for creating input fields.
<force:inputField aura:id="yourID" 
                 value="Value"/>
<ui:input label=yourLabel" value="Value/>

Try using them. Hope that Helps,

Regards,
Alsinan
 

All Answers

alsinan nazimalsinan nazim
Hi Jorg_Janke,

Although lightning;input supports ONBLUR, it is BETA, So you can use <ui:input> or <force:input> or HTML <input> tags for creating input fields.
<force:inputField aura:id="yourID" 
                 value="Value"/>
<ui:input label=yourLabel" value="Value/>

Try using them. Hope that Helps,

Regards,
Alsinan
 
This was selected as the best answer
Jorg_JankeJorg_Janke
Thanks - as mentioned, the ui:input works fine - but the force:inputField does not have a blur.
alsinan nazimalsinan nazim
Great. If that helped you out, please close this thread by marking the Best Answer. Regards, Alsinan P Please consider the environment before printing this e-mail -- SAVE PAPER! SAVE THE PLANET!