@@ -209,7 +209,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
209209 test ( 'should not override keyboard interactions for textarea elements' , async ( { page, browserName } ) => {
210210 const tabKey = browserName === 'webkit' ? 'Alt+Tab' : 'Tab' ;
211211 const popover = page . locator ( 'ion-popover' ) ;
212- const innerNativeTextarea = page . locator ( 'ion-textarea textarea' ) . nth ( 0 ) ;
212+ const innerNativeTextarea = page . locator ( 'ion-textarea' ) . locator ( ' textarea') . nth ( 0 ) ;
213213 const vanillaTextarea = page . locator ( 'ion-textarea + textarea' ) ;
214214
215215 await popoverFixture . open ( '#popover-with-textarea' ) ;
@@ -220,43 +220,32 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
220220 */
221221 await expect ( popover ) . toBeFocused ( ) ;
222222
223+ // Tab should focus the native textarea inside ion-textarea
223224 await page . keyboard . press ( tabKey ) ;
224-
225- // for Firefox, ion-textarea is focused first
226- // need to tab again to get to native input
227- if ( browserName === 'firefox' ) {
228- await page . keyboard . press ( tabKey ) ;
229- }
230-
231225 await expect ( innerNativeTextarea ) . toBeFocused ( ) ;
232226
227+ // Arrow keys should work on the ion-textarea
233228 await page . keyboard . press ( 'ArrowDown' ) ;
234-
235229 await expect ( innerNativeTextarea ) . toBeFocused ( ) ;
236230
237231 await page . keyboard . press ( 'ArrowUp' ) ;
238-
239232 await expect ( innerNativeTextarea ) . toBeFocused ( ) ;
240233
234+ // Tab again should focus the vanilla textarea
241235 await page . keyboard . press ( tabKey ) ;
242- // Checking within HTML textarea
243-
244236 await expect ( vanillaTextarea ) . toBeFocused ( ) ;
245237
238+ // Arrow keys should work on the vanilla textarea
246239 await page . keyboard . press ( 'ArrowDown' ) ;
247-
248240 await expect ( vanillaTextarea ) . toBeFocused ( ) ;
249241
250242 await page . keyboard . press ( 'ArrowUp' ) ;
251-
252243 await expect ( vanillaTextarea ) . toBeFocused ( ) ;
253244
254245 await page . keyboard . press ( 'Home' ) ;
255-
256246 await expect ( vanillaTextarea ) . toBeFocused ( ) ;
257247
258248 await page . keyboard . press ( 'End' ) ;
259-
260249 await expect ( vanillaTextarea ) . toBeFocused ( ) ;
261250 } ) ;
262251 } ) ;
0 commit comments