Skip to content

Commit 0aac0dc

Browse files
committed
fix(textarea): add delegatesFocus to resolve Firefox focus errors
1 parent d1d2635 commit 0aac0dc

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

core/src/components/textarea/textarea.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ import type { TextareaChangeEventDetail, TextareaInputEventDetail } from './text
5454
md: 'textarea.md.scss',
5555
ionic: 'textarea.ionic.scss',
5656
},
57-
shadow: true,
57+
shadow: {
58+
delegatesFocus: true,
59+
},
5860
formAssociated: true,
5961
})
6062
export class Textarea implements ComponentInterface {
@@ -464,8 +466,8 @@ export class Textarea implements ComponentInterface {
464466
this.runAutoGrow();
465467

466468
// Override focus() to delegate to the native textarea.
467-
// This is needed for Safari which doesn't properly delegate
468-
// focus when calling focus() directly on the host.
469+
// This is needed for Safari and Firefox which don't properly
470+
// delegate focus when calling focus() directly on the host.
469471
this.el.focus = () => {
470472
this.setFocus();
471473
};

0 commit comments

Comments
 (0)