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
Pasan   EeriyagamaPasan Eeriyagama 

Lightning component Attribute value is not set in Internet Explorer 11

Found this issue in Internet Explorer. Below is my code.

testApp.app​
<aura:application >
    <aura:attribute name="opp" type="Opportunity" default="{ 'sobjectType': 'Opportunity', 'Name':''}" access="public"/>
    <ui:inputText value="{!v.opp.Name}" keyup="{!c.readName}"/>
</aura:application>
JS Controller
 
({
    readName: function(component, event, helper) {

        if ((event.getParams().keyCode) != 13)
            return;

        var opp = component.get('v.opp');

        console.log('item: '+JSON.stringify(opp));
    },
})

In Internet Explorer
console.log() logs nothing for opp.Name
User-added image

In Firefox (Other browsers also works fine)


User-added image

I tried using a String type,also using keydown event, but doesn't seem to work for even simple String variables.Is this a bug in SF?
Appreciate any help on this?
Thanks.
 
Pasan   EeriyagamaPasan Eeriyagama
Fixed (forcing blur event in IE as below)
 
({
    readName: function(component, event, helper) {
        if(event.getParams().keyCode === 13) {
            var el = event.getSource() && event.getSource().getElement && 
                event.getSource().getElement();
            el && el.blur && el.blur();
            var opp = component.get('v.opp');
            console.log('item: '+JSON.stringify(opp));
            el && el.focus && el.focus();
        }
    },
})

Thanks to @sdfcfox's answer here https://salesforce.stackexchange.com/questions/208955/lightning-component-attribute-value-is-not-set-in-internet-explorer-11