fix(date-range): projected input focus restore on consecutive close #14951
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to #14918
The caching of the active projected input is done on
focus
:igniteui-angular/projects/igniteui-angular/src/lib/date-range-picker/date-range-picker.component.ts
Lines 1011 to 1016 in 715c43a
Which means this handling on close:
igniteui-angular/projects/igniteui-angular/src/lib/date-range-picker/date-range-picker.component.ts
Lines 763 to 766 in 715c43a
Returns the focus to the input (it's cached) and then immediately deletes it, meaning the next open won't have this and won't restore the focus back on close.
The caching should be done on open IMO, but short of refactoring that just moving the cleanup on the actual component-level blur handler.
Additional information (check all that apply):
Checklist:
feature/README.MD
updates for the feature docsREADME.MD
CHANGELOG.MD
updates for newly added functionalityng update
migrations for the breaking changes (migrations guidelines)