question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Toast is stealing input focus.

See original GitHub issue

Ionic version: (check one with “x”) [ ] 1.x [ ] 2.x [x] 3.x

I’m submitting a … (check one with “x”) [x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior: When a toast shows, any active input fields lose focus.

Expected behavior: The toast should in no way affect focus

Steps to reproduce: Have an async task open a toast while you have an input focussed.

I’ve made an example here

http://plnkr.co/edit/7lBnWL2ucp8N9qAHSAmt?p=preview

–>

Related code:


Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

global packages:

    @ionic/cli-utils : 1.0.0
    Cordova CLI      : 7.0.1
    Ionic CLI        : 3.0.0

local packages:

    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-cordova       : 1.0.0
    @ionic/cli-plugin-ionic-angular : 1.0.0
    Ionic Framework                 : ionic-angular 3.2.1

System:

    Node       : v6.9.2
    OS         : Windows 10
    Xcode      : not installed
    ios-deploy : not installed
    ios-sim    : not installed

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
mfdevelopercommented, Jul 30, 2017

Hello @jgw96 and @RyanHow I did a PR !12515 that contains a suggestion solution for this problem. I hope that help you 😄

0reactions
ionitron-bot[bot]commented, Nov 1, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

Toast is stealing input focus. · Issue #11692 · ionic ... - GitHub
When a toast shows, any active input fields lose focus. Expected behavior: The toast should in no way affect focus. Steps to reproduce:...
Read more >
How to refocus the Input-Field once the Toast is displayed
I have an InputField, when the length of the String entered in the InputField becomes 0, it should display a toast and on...
Read more >
Ionic Version 6 (Angular) Toast now holds focus preventing ...
I'm unable to force the focus again to my input when I create the toast, I'm forced to wait the dismiss of it....
Read more >
ion toast blocks focus on any input in Ionic 6 - Stack Overflow
Apparently the issue occurs because the toast steals focus from the inputs and it has something to do with tapindex set to -1....
Read more >
How do I prevent toast from taking away focus? - Mobiscroll
I'm doing an auto-save onchange of an input and toasting a “Saved” message, but if the user clicks onto the next input (triggering...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found