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

ev.which is readonly and hence should not be assigned during normalization. #509

Open
fa93hws opened this issue Sep 19, 2021 · 0 comments
Open

Comments

@fa93hws
Copy link

fa93hws commented Sep 19, 2021

https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/which
image

e.which = e.keyCode;

            if (typeof e.which !== 'number') {
                e.which = e.keyCode;
            }

should becomes something like

const charCode = (typeof e.which == "number") ? e.which : e.keyCode;

and charCode should be passed to methods later instead of using e.which everywhere.

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

1 participant