I have a simple component which I am trying to handle a click on. When I click I am getting the following error:

Something has gone wrong. [NoErrorObjectAvailable] Access Check Failed! AttributeSet.get(): attribute 'disableDoubleClicks' of component 'markup://ui:outputText {40:5;a}' is not visible to 'markup://ui:outputText {40:5;a}'.
Please try again.

I have used the Lightning Inspector to verify that the {40:5;a} is indeed the global ID of the element which I am clicking. I am at a loss, because I am not doing anything with DOUBLE clicking - just trying to handle a simple single click on the outputText element.

In searching, I ran across the following thread, however the issue which was discussed in that thread (which was a bug in the framework) has been marked as resolved, so I'm guessing this is a different issue.

Access Check Failed! even though component is marked with access of global

Parent Component

<aura:component controller="AthenaListController">
    <aura:attribute access="public" name="listType" type="String" required="true" />
    <aura:attribute access="public" name="listEntityType" type="String" required="true" />
    <aura:attribute access="public" name="listEntityId" type="String" required="true" />

    <aura:attribute access="private" name="territoryIds" type="String[]" />
    <aura:attribute access="private" name="listEntries"  type="CRM_Athena_List_Entry__c[]" />

    <aura:handler name="init" value="{!this}" action="{!c.init}" />

    <hr />

    <aura:iteration items="{!v.listEntries}" var="listEntry">
        <c:AthenaListItem listEntry="{!listEntry}" />


Child component

<aura:component >
    <aura:attribute access="public" name="listEntry" type="CRM_Athena_List_Entry__c" required="true" />

        List entry: <ui:outputText value="{!v.listEntry.Id}" click="{!c.handleClick}" />

Child component controller

    handleClick : function(component, event, helper) {
        console.log('button clicked');

This is indeed a bug with the ui:outputText component. You can open a case to track this and have them link to internal work item W-3204241.

If you care about the technical details...

The issue is that ui:outputText uses a generic library to attach DOM event handlers, and the click handler assumes the presence of the disableDoubleClicks attribute on the component. When you click the ui:outputText the handler does a component.get("v.disableDoubleClicks") and since it does not exist for this particular component, the framework throws an Access Check Failure.

If you aren't doing anything fancy with the ui:outputText component, I suggest using a workaround similar to what Charles T suggested for now.

|improve this answer|||||
  • 1
    Thanks Trevor! Sounds like you know what you're talking about (especially since you know the internal work item #) :-) I have an open case already and will point them towards this thread. Thanks again! – loneboat Jun 30 '16 at 13:30
  • Is it fixed in winter 17? – realnumber Oct 10 '16 at 18:08
  • No, not yet. I see the owning team still has the bug marked as in progress. – TrevorBliss Oct 10 '16 at 20:43

This does seem to fit the pattern of other issues that were framework bugs. Most of them were reported on input elements. It could be that they just did not test this particular combination of events on ui:outputText. However since you are just looking to output some dynamic text and this is not an input binding, you could just as easily do this with your own span:

    List entry: <span onclick="{!c.handleClick}">{!v.listEntry.Id}</span>
|improve this answer|||||
  • Thanks for the answer. Seems strange that this is maybe a framework bug and not something I am doing wrong. It's not like I am doing something exotic - it's just a simple click event on a component. Surely I'm not the first to handle a click event on an outputText! :-) Do you have any advice where to go for further help in exploring it? – loneboat Jun 29 '16 at 13:54
  • No idea frankly, but hopefully the Lightning team will see this and verify if it's something they can squash soon. I think people don't end up using ui:outputText all that often because you can always insert text from a variable using a simple binding syntax. – Charles T Jun 29 '16 at 15:12

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.