I've discovered a strange bug in Internet Explorer with ui:inputCurrency and ui:inputNumber lightning components (probably it also affects other "number" components -> ui:inputPercent).

When your user locale is set to locale that has "," - comma as decimal separator (e.g.: Swedish) - the value entered into the field is being cleared (you enter 123, and it disappears after you exit input field).

This exist only when you have change attribute specified on the component (as below), even if there is no code executed in the c.doSomething function:

<ui:inputCurrency value="{!v.value} change="{!c.doSomething}"/>
<ui:inputNumber value="{!v.value2} change="{!c.doSomething2}"/>

This occurs in Internet Explorer / Edge (tested on 11). IE displays following error in the console:

Error message

Other browsers and locale with dot as decimal separator (e.g. English (United Kingdom)) work fine.

Do you know if it's a framework issue, or am I doing something wrong?

SFDC case: #14608029

Here is the component code - you may try to replicate it in your environment:


<aura:component >

    <aura:attribute name="valueCurrency" type="Decimal"/>
    <aura:attribute name="valueCurrency2" type="Decimal"/>

    INPUT CURRENCY (with change attribute):

    <ui:inputCurrency value="{!v.valueCurrency}"
                      format="{!'######0.00 EUR'}"
                      class="{!'form form-control'}"/>


    INPUT CURRENCY (without change attribute):

    <ui:inputCurrency value="{!v.valueCurrency2}"
                      format="{!'######0.00 EUR'}"
                      class="{!'form form-control'}"/>




    attributeChange : function(component, event, helper) {
  • Any luck on this ? Oct 24 '17 at 14:47
  • I don't remember, but I think we've changed to onblur Oct 25 '17 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.