Skip to content

bug: Skip focus on <ion-textarea> elements when using tabindex=-1 #26944

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
AppGonder opened this issue Mar 10, 2023 · 2 comments · Fixed by #26945
Closed
3 tasks done

bug: Skip focus on <ion-textarea> elements when using tabindex=-1 #26944

AppGonder opened this issue Mar 10, 2023 · 2 comments · Fixed by #26945
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@AppGonder
Copy link

AppGonder commented Mar 10, 2023

Prerequisites

Ionic Framework Version

v6.x

Current Behavior

when using tabindex=-1 to avoid a focus on input, it works fine on <ion-input> but on <ion-textarea> is not working on ionic versions greather then v4.

<ion-item>
  <ion-textarea placeholder="Test" tabindex="-1"></ion-textarea>
</ion-item>

<ion-item>
  <ion-input placeholder="Test" tabindex="-1"></ion-input>
</ion-item

Expected Behavior

Pressing tab or enter key, the behavior is expected to not focus on next inputs or text areas. Inspecting the html element the attribute tabindex is not passing for the <textarea> element.

Steps to Reproduce

add tabindex=-1 to html tags <ion-input> and <ion-textarea> and press tab key on keyboard, the focus is skipped on the forms

Code Reproduction URL

No response

Ionic Info

Ionic:

Ionic CLI : 6.20.1
Ionic Framework : @ionic/angular 6.1.8
@angular-devkit/build-angular : 13.1.2
@angular-devkit/schematics : 13.1.2
@angular/cli : 13.1.2
@ionic/angular-toolkit : 6.1.0

Capacitor:

Capacitor CLI : 3.5.1
@capacitor/android : 3.5.1
@capacitor/core : 3.5.1
@capacitor/ios : 3.5.1

Utility:

cordova-res : 0.15.4
native-run : 1.6.0

System:

NodeJS : v16.14.0
npm : 8.19.2
OS : Windows 10

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Mar 10, 2023
@AppGonder AppGonder changed the title bug: bug: Skip focus on <ion-textarea>elements Mar 10, 2023
@AppGonder AppGonder changed the title bug: Skip focus on <ion-textarea>elements bug: Skip focus on <ion-textarea> elements when using tabindex=-1 Mar 10, 2023
@liamdebeasi liamdebeasi self-assigned this Mar 13, 2023
@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report labels Mar 13, 2023
@ionitron-bot ionitron-bot bot removed the triage label Mar 13, 2023
@liamdebeasi liamdebeasi removed their assignment Mar 13, 2023
@liamdebeasi
Copy link
Contributor

Thanks for the issue. This has been resolved via #26945, and a fix will be available in an upcoming release of Ionic Framework.

@ionitron-bot
Copy link

ionitron-bot bot commented Apr 12, 2023

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants