5

We have a community built with custom lightning components and the locker service update is active. The onclick event has been defined on several components. The onclicks are working fine in Chrome, Firefox and IE11.

<a href="" onclick="{!c.updateUser}">Save</a>

There seem to be some issues in MS Edge though. When we click on an element with an onclick defined, we get the following error:

This page has an error. You might just need to refresh it. Error in $A.getCallback() [Unable to get property 'apply' of undefined or null reference] Failing descriptor: {markup://aura:html}

We have been testing on 5 different laptops. 3 of them have the error, while the other 2 don't have the issue in Edge. This was all tested in a Spring 17 sandbox. We also tested on a Winter 17 org with one of the laptops that has the issue and then everything seems to work fine.

Another test we did, was to remove all of the logic within the controller method and just have a console.log in it, but it never reached that point of the code since we didn't get the log. We also replaced the expression for the onclick with an alert, but that also doesn't work.

Does anyone have an idea how we can resolve this?

  • 1
    Since some machines with Edge work and some don't it would seem it is machine specific no? Might be tough for anyone here to diagnose unless they have run into this specific issue which I hope someone has.... – Eric Feb 10 '17 at 18:38
  • I also thought it was machine specific, but 1 machine has the issue on a Spring 17 sandbox, but not on a Winter 17 production org, so this 1 case isn't machine specific. – svenf Feb 10 '17 at 18:42
  • Still machine specific if another works. Machine could be handling the environment differently causing it to not work. If one machine can access it fine and the other cannot all things being equal it is machine specific. Now thats not to say there is not something in the code that could be optimized to mitigate the risk but.......the issue is something on that machine that is causing it to choke on the code. The resolution can be identified if you can find out the specific issue on the machine then that can be used to optimize the source code to mitigate it. – Eric Feb 10 '17 at 18:43
  • @svenf have you deactivated Locker in the org and verified the issue goes away? This issue does not look like something likely to be Locker specific - sounds more like a general Lightning framework issue and I'd like to first eliminate LS from the mix to help narrow the focus. – Doug Chasman Feb 10 '17 at 19:26
  • @DougChasman I just disabled Locker. Then I don't get the error and the controller function is being executed. – svenf Feb 10 '17 at 19:53
1

@svenf I just verified:

test.app:

<a href="" onclick="{!c.updateUser}">Save</a>

testController.js:

({
    updateUser : function(component, event, helper) {
        alert("Updating user!");
    }
})

on a Spring'17 org with Locker activated using Edge and its working flawlessly.

I am using:

Microsoft Edge 38.14393.0.0

Microsoft EdgeHTML 14.14393

  • Thanks for testing. I did the same test on 2 environments (full sandbox and a developer pro sandbox) with Locker enabled. Both of them are on the same instance (cs81). Your test gives the error on full sandbox, but not on the sandbox. I used the same Edge version as you. It seems as it is only going wrong on the full sandbox. I will let Support look into it, as you suggested. – svenf Feb 14 '17 at 7:40

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.