So what I am trying to do is have the user select a radio button, click next, then be taken to a different view depending on what they selected.


<aura:application >
  <ltng:require scripts="{!$Resource.jquery}" afterScriptsLoaded="{!c.doInit}" />
  <aura:attribute name="radiochoice" type="Integer" default="0"/>
  <aura:attribute name="stage" type="Integer" default="0" />
  <aura:if isTrue="{!v.stage == 0}">
    <fieldset class="slds-form-element">
      <label class="slds-form-element__label" for="select-01"> </label>
      <div class="slds-form-element__control">
        <label class="slds-radio">
          <input type="radio" name="options" value="1" />
          <span class="slds-radio--faux"></span>
          <span class="slds-form-element__label">Choice 1</span>
        <label class="slds-radio">
          <input type="radio" name="options" value="2" />
          <span class="slds-radio--faux"></span>
          <span class="slds-form-element__label">Choice 2</span>
    <ui:button  buttonTitle="Click to check radiobutton" class="button" label="Check" press="{!c.getInput}"/>
  <aura:if isTrue="{!v.stage == 1}">
    <ui:button  buttonTitle="Click to go back" class="button" label="Back" press="{!c.back}"/>


    doInit : function(cmp, event, helper) {

  getInput: function(cmp, evt) {
    cmp.set("v.radiochoice", $("input[name='options']:checked").val());
            cmp.set("v.stage", 1);
    back : function(cmp, evt) {
        cmp.set("v.stage", 0);

When I select a value I should be sent to the next page and shown the value of the radio button I selected. Without LockerService, it seems to work fine. Without LockerService

When I enable LockerService, it seems to always fetch whatever the first selected value was. With LockerService


This is definitely incorrect behavior, and would appear to be a bug in the way locker service wraps elements to protect access. I opened an internal bug W-3203877 and will try to verify in the next day.

If you can open a case, please do, and let them know the bug number.

  • Could this be related to the issue where binding to properties of arrays/objects gets stuck on the first value? Despite the fact that it's happening at the level of mock DOM nodes it's similar behaviour. – Charles T Jun 21 '16 at 20:32

This is fixed in the Spring '17 major release. Thanks for the great repro!

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.