-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Bug, feature request, or proposal:
Bug
What is the expected behavior?
Use of 'cdk-focus-initial' will result in printing the following warning
Found use of deprecated attribute 'cdk-focus-initial', use 'cdkFocusInitial' instead.
What is the current behavior?
No message is printed because this._element
is checked for a cdk-focus-initial
attribute rather than redirectToElement
. See reference to relevant lines below—shown is v5.2.4
, but the same applies to master
.
What are the steps to reproduce?
The below repro is basically the same as the example on the Angular Material website, but cdk-focus-initial
instead of cdkFocusInitial
.
https://stackblitz.com/edit/angular-material2-deprecated-cdk-focus-initial
What is the use-case or motivation for changing an existing behavior?
Correctly showing deprecation warning.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Versions of @angular/cdk
since c663fad was introduced in 5.0.0-rc0
.
Is there anything else we should know?
The changelog for 5.0.0-rc0
only noted the attribute change to camel case (quote shown below) but did not note it as a deprecation, which is problematic because users haven't been getting this warning at all so far as shown above.
focus-trap: update focus trap attrs to camel case #6799 (#6960) (c663fad)