Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

item._otherValueChecked not true inside updateRadioListForOther() #24

Open
dwwinters opened this issue Jan 22, 2020 · 2 comments
Open

Comments

@dwwinters
Copy link

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 and value.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 sets item._otherValueChecked to false:
https://github.com/lhncbc/lforms/blob/master/app/scripts/lforms-controllers.js#L1068

Clicking on the OTHER radio button I can see within $scope.updateRadioListForOther that item._otherValueChecked is still false:
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 time item._otherValueChecked is true.

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 to true directly within $scope.updateRadioListForOther? This seems to work for me, but wondering if it breaks anything on linux.

@plynchnlm
Copy link
Member

Thanks for the report. I've confirmed this happens with AngularJS 1.7.9 (though it worked with 1.5.8).

@plynchnlm
Copy link
Member

plynchnlm commented May 11, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants