Skip to content
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

bug: ion-toast prevents focusing ion-input while visible #24571

Closed
4 of 6 tasks
papagei-ma opened this issue Jan 12, 2022 · 2 comments
Closed
4 of 6 tasks

bug: ion-toast prevents focusing ion-input while visible #24571

papagei-ma opened this issue Jan 12, 2022 · 2 comments
Assignees
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@papagei-ma
Copy link

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

When a toast is being displayed the input elements (type='text', because checkboxes, selects and buttons work properly) are not working. I checked that they are not disabled, but somehow the click event is not captured. The element keep working programmatically properly, as I set a timer and changed the value of the bound variable every second, and the value gets emitted to the element. But no user interactivity is available

Expected Behavior

One can type in the input element

Steps to Reproduce

  1. Have an ion-input or an html input type='text' on your page.
  2. Create a toast for a reasonable amount of time maybe 5 seconds, through
    const toast = await this.toastController.create({ message: 'Your settings have been saved.', duration: 2000 }); toast.present();
  3. While the toast is showing, try to type anything in the input element.

Code Reproduction URL

https://github.com/papagei-ma/ion-toast-v6

Ionic Info

Ionic:

Ionic CLI : 6.16.3 (/opt/homebrew/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.0.2
@angular-devkit/build-angular : 13.0.4
@angular-devkit/schematics : 13.0.4
@angular/cli : 13.0.4
@ionic/angular-toolkit : 5.0.3

Additional Information

Checked on Chrome and safari, bug appears on both.

@ionitron-bot ionitron-bot bot added the triage label Jan 12, 2022
@sean-perkins sean-perkins self-assigned this Jan 13, 2022
@sean-perkins
Copy link
Contributor

Thanks for reporting this!

On an initial look, it looks like the keyboard focus trap we use for overlays is being applied to toasts (when it shouldn't).

@sean-perkins sean-perkins changed the title bug: ion-input not working when ion-toast is showing bug: ion-toast prevents focusing ion-input while visible Jan 13, 2022
@sean-perkins sean-perkins added package: core @ionic/core package type: bug a confirmed bug report labels Jan 13, 2022
@ionitron-bot ionitron-bot bot removed the triage label Jan 13, 2022
@ionitron-bot
Copy link

ionitron-bot bot commented Feb 18, 2022

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 Feb 18, 2022
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

No branches or pull requests

2 participants