-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(textarea): inherit tabindex to inner textarea (#26945)
resolves #26944
- Loading branch information
1 parent
389595d
commit 2c68d01
Showing
3 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { newSpecPage } from '@stencil/core/testing'; | ||
import { Input } from '../input'; | ||
|
||
it('should inherit attributes', async () => { | ||
const page = await newSpecPage({ | ||
components: [Input], | ||
html: '<ion-input title="my title" tabindex="-1" data-form-type="password"></ion-input>', | ||
}); | ||
|
||
const nativeEl = page.body.querySelector('ion-input input'); | ||
expect(nativeEl.getAttribute('title')).toBe('my title'); | ||
expect(nativeEl.getAttribute('tabindex')).toBe('-1'); | ||
expect(nativeEl.getAttribute('data-form-type')).toBe('password'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { newSpecPage } from '@stencil/core/testing'; | ||
import { Textarea } from '../textarea'; | ||
|
||
it('should inherit attributes', async () => { | ||
const page = await newSpecPage({ | ||
components: [Textarea], | ||
html: '<ion-textarea title="my title" tabindex="-1" data-form-type="password"></ion-textarea>', | ||
}); | ||
|
||
const nativeEl = page.body.querySelector('ion-textarea textarea'); | ||
expect(nativeEl.getAttribute('title')).toBe('my title'); | ||
expect(nativeEl.getAttribute('tabindex')).toBe('-1'); | ||
expect(nativeEl.getAttribute('data-form-type')).toBe('password'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters