Open dwwinters opened 4 years ago
Thanks for the report. I've confirmed this happens with AngularJS 1.7.9 (though it worked with 1.5.8).
I think we might have fixed this in [21.0.0] 2020-02-26, because we updated the bower components to Angular 1.7.9 and had to make a change to the event listener. If you are able to re-test with the latest lforms, that would be helpful.
Ran into another test which is failing on my windows/chrome build: https://github.com/lhncbc/lforms/blob/master/test/protractor/spec/lforms_display_controls.spec.js#L81
From what I can gather, clicking on the OTHER radio button should cause
value.code
andvalue.text
to be null/undefined in$scope
. However this doesn't happen on my installation and thus the above test fails. Clicking on any other radio button in the question fires$scope.updateRadioList
which setsitem._otherValueChecked
tofalse
: https://github.com/lhncbc/lforms/blob/master/app/scripts/lforms-controllers.js#L1068Clicking on the OTHER radio button I can see within
$scope.updateRadioListForOther
thatitem._otherValueChecked
is stillfalse
: https://github.com/lhncbc/lforms/blob/master/app/scripts/lforms-controllers.js#L1077 Clicking the OTHER radio button a second time or entering characters into the text input box causes$scope.updateRadioListForOther
to fire again and this timeitem._otherValueChecked
istrue
.So for whatever reason
item._otherValueChecked
isn't getting toggled until after$scope.updateRadioListForOther
on my system. This was easy to tell since I can see the text input box showing up after clicking on OTHER. Would it make sense to set_otherValueChecked
totrue
directly within$scope.updateRadioListForOther
? This seems to work for me, but wondering if it breaks anything on linux.