question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

onKeydown(event) requires deprecated attribute event.keyCode.

See original GitHub issue

🐞 bug report

Affected Package

The issue is caused by package @angular/cdk/fesm2015/a11y.js

Is this a regression?

No, but the previous version supported the event.keyCode and event.which attributes, which were not deprecated before but are now

Description

The onKeydown(event) function

πŸ”¬ Minimal Reproduction

 _                      _                 ____ _     ___
/ \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|

/ β–³ \ | '_ \ / | | | | |/ _ | '__| | | | | | | / ___ | | | | (| | || | | (| | | | || | | | // __| ||_, |_,||_,|| _||| |___/

Angular CLI: 9.1.9 Node: 12.3.0 OS: win32 x64

Angular: 9.1.9 … animations, cli, common, compiler, compiler-cli, core, forms … language-service, platform-browser, platform-browser-dynamic … router, service-worker Ivy Workspace: Yes

Package Version

@angular-devkit/architect 0.901.9 @angular-devkit/build-angular 0.901.9 @angular-devkit/build-ng-packagr 0.901.9 @angular-devkit/build-optimizer 0.901.9 @angular-devkit/build-webpack 0.901.9 @angular-devkit/core 9.1.9 @angular-devkit/schematics 9.1.9 @angular-devkit/schematics-cli 0.901.9 @angular/cdk 9.2.4 @angular/material 9.2.4 @ngtools/webpack 9.1.9 @schematics/angular 9.1.9 @schematics/schematics 0.901.9 @schematics/update 0.901.9 ng-packagr 9.1.5 rxjs 6.5.5 typescript 3.8.3 webpack 4.42.0

Anything else relevant? Attachments

Enironment.txt

a11y.zip 2020-09-28_13-00-44 onKeydown only takes event with deprecated value

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
AndrewKushnircommented, Sep 28, 2020

Hi @James-Vanguard, this question is related to Material Components, so I’m transferring this ticket to the Components repo for further investigation. Thank you.

0reactions
angular-automatic-lock-bot[bot]commented, Nov 1, 2020

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Alternative for event's deprecated KeyboardEvent.which ...
When getting text input from the user, use the keypress event along with e.key; For shortcuts and other combinations, the built-in way is...
Read more >
KeyboardEvent.keyCode - Web APIs - MDN Web Docs
The deprecated KeyboardEvent.keyCode read-only property represents a system and implementation dependent numerical code identifying theΒ ...
Read more >
KeyboardEvent.keyCode deprecated! Alternate is .key
I have been using KeyboardEvent.keyCode property to detect the keys pressed in JavaScript. For example, in one of my applications,Β ...
Read more >
Checking for Keyboard Events in JavaScript with Cross ...
KeyCode was deprecated because in practice it was β€œinconsistent across platforms and even the same implementation on different operating systems or usingΒ ...
Read more >
JavaScript Keycode List – Keypress Event Key Codes for ...
There are primarily three keyboard event types, keydown , keypress ... This has been deprecated and we should use the key property instead....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found