Skip to content

Commit

Permalink
feat(design): focus stack pushes arg or the document's active element (
Browse files Browse the repository at this point in the history
  • Loading branch information
xelaint committed Oct 2, 2023
1 parent 540a550 commit 189d132
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/design/src/core/focus/stack.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export class DaffFocusStackService {
* this._focusStack.push(this._doc.activeElement);
* ```
*/
push(el: HTMLElement): number {
this._stack.push(el);
push(el: HTMLElement | undefined = undefined): number {
this._stack.push(el ?? this.document.activeElement);
return this._stack.length;
}

Expand Down

0 comments on commit 189d132

Please sign in to comment.