Skip to content

Commit

Permalink
docs(esl-toggleable): fix TS doc according to review points
Browse files Browse the repository at this point in the history
Co-authored-by: Dmytro Shovchko <d.shovchko@gmail.com>
  • Loading branch information
ala-n and dshovchko authored Nov 18, 2024
1 parent fbac20e commit 7f75696
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/esl-toggleable/core/esl-toggleable-focus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ export class ESLToggleableFocusManager {
return this.stack[this.stack.length - 1];
}

/** Check if the element is in the known focus scopes */
/** Checks if the element is in the known focus scopes */
public has(element: ESLToggleable): boolean {
return this.stack.includes(element);
}

/** Change focus scope to the specified element. Previous scope saved in the stack. */
/** Changes focus scope to the specified element. Previous scope saved in the stack. */
public attach(element: ESLToggleable): void {
if (element.focusBehavior === 'none' && element !== this.current) return;
// Remove the element from the stack and add it on top
Expand All @@ -42,7 +42,7 @@ export class ESLToggleableFocusManager {
queueMicrotask(() => afterNextRender(() => element.focus({preventScroll: true})));
}

/** Remove the specified element from the known focus scopes. */
/** Removes the specified element from the known focus scopes. */
public detach(element: ESLToggleable): void {
if (!this.has(element)) return;
const {current} = this;
Expand Down

0 comments on commit 7f75696

Please sign in to comment.