Skip to content

Commit

Permalink
fix(page-slide): ajusta regra do foco no elemento
Browse files Browse the repository at this point in the history
  • Loading branch information
felipepetuco authored and anderson-gregorio-totvs committed Mar 18, 2024
1 parent 22a36fc commit d8603d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ describe('PoPageSlideComponent', () => {

tick(100);

const pageSlideContent = debugElement.query(By.css('.po-page-slide-content'));
const pageSlideContent = debugElement.query(By.css('button'));
expect(document.activeElement).toEqual(pageSlideContent.nativeElement);

flush();
Expand All @@ -200,7 +200,7 @@ describe('PoPageSlideComponent', () => {

tick(100);

const input = fixtureTest.debugElement.query(By.css('input[name="username"]'));
const input = fixtureTest.debugElement.query(By.css('button'));
expect(document.activeElement).toEqual(input.nativeElement);

flush();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ export class PoPageSlideComponent extends PoPageSlideBaseComponent {
this.firstElement.focus();
} else {
const elements = getFocusableElements(this.pageContent.nativeElement);
const element = elements[1] || this.pageContent.nativeElement;
/* istanbul ignore next */
const element = elements[0] || this.pageContent.nativeElement;
element.focus();
}
}
Expand Down

0 comments on commit d8603d1

Please sign in to comment.