Skip to content

Checkbox not working in Internet Explorer 11 #143

@fawcettjt

Description

@fawcettjt

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ x ] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request

Current behavior

amexio-checkbox is not functioning as expected in Internet Explorer. In Firefox and Chrome, no errors are generated and the box, when clicked, shows a check mark as expected.
In Internet Explorer, when the table is loaded that contains the amexio-checkbox elements, the logs show the following error (one for each row in the table):

ERROR TypeError: Unable to get property 'getRandomValues' of undefined or null reference

The stacktrace shows:

"TypeError: Unable to get property 'getRandomValues' of undefined or null reference
at AmexioFormValidator.prototype.createCompId (eval code:28588:9)
at AmexioCheckBoxComponent.prototype.ngOnInit (eval code:28681:9)
......

This is all before anything is clicked. If the checkbox is clicked, nothing happens. The check mark does not appear.

Doing some research, it looks like this is likely because IE11 only partially supports the window.crypto.getRandomValues call that is used in the checkbox component of Amexio (looks like line 179 of checkbox.component.ts). It says it should work with the ms prefix ((Window.msCrypto.getRandomValues):
https://developer.mozilla.org/en-US/docs/Web/API/Window/crypto#Browser_compatibility

Expected behavior

Hoping for functionality of the checkbox in Internet Explorer 11 and Edge. Can you add the ms prefix as MDN shows for IE functionality?

What is the motivation / use case for changing the behavior?

Motivation is just to have full functionality on all browsers.

Environment


Angular version: 9.0.5


Browser:
- [ x ] IE version 11
- [ x ] Edge version 44
 
For Tooling issues:
- Node version: 12.13.1  
- Platform:  Windows

Others:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions