Skip to content

Commit

Permalink
fix: [#1487] Changes wrong property name inputmode to inputMode in HT…
Browse files Browse the repository at this point in the history
…MLInputElement and HTMLTextAreaElement
  • Loading branch information
capricorn86 committed Aug 29, 2024
1 parent 48dc929 commit 8c3de8b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ export default class HTMLInputElement extends HTMLElement {
*
* @returns Inputmode.
*/
public get inputmode(): string {
public get inputMode(): string {
return this.getAttribute('inputmode') || '';
}

Expand All @@ -496,7 +496,7 @@ export default class HTMLInputElement extends HTMLElement {
*
* @param inputmode Inputmode.
*/
public set inputmode(inputmode: string) {
public set inputMode(inputmode: string) {
this.setAttribute('inputmode', inputmode);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export default class HTMLTextAreaElement extends HTMLElement {
*
* @returns Inputmode.
*/
public get inputmode(): string {
public get inputMode(): string {
return this.getAttribute('inputmode') || '';
}

Expand All @@ -167,7 +167,7 @@ export default class HTMLTextAreaElement extends HTMLElement {
*
* @param inputmode Inputmode.
*/
public set inputmode(inputmode: string) {
public set inputMode(inputmode: string) {
this.setAttribute('inputmode', inputmode);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ describe('HTMLInputElement', () => {
'pattern',
'placeholder',
'step',
'inputmode'
'inputMode'
]) {
describe(`get ${property}()`, () => {
it('Returns attribute value.', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ describe('HTMLTextAreaElement', () => {
});
}

for (const property of ['name', 'autocomplete', 'cols', 'rows', 'placeholder']) {
for (const property of ['name', 'autocomplete', 'cols', 'rows', 'placeholder', 'inputMode']) {
describe(`get ${property}()`, () => {
it('Returns attribute value.', () => {
expect(element[property]).toBe('');
Expand Down

0 comments on commit 8c3de8b

Please sign in to comment.