Giter Club home page Giter Club logo

Comments (6)

limonte avatar limonte commented on May 18, 2024

When you click the button on the demo page that button gets a focus and click event. Click event cause modal opening. When you close the modal window focus will be returned to the button. And when you hit enter it cause click event on button by default.

So it's not a bug :)

from sweetalert2.

nickfederighi avatar nickfederighi commented on May 18, 2024

Unfortunately, I'm not sure that is problem. Maybe I'm wrong... In my implementation, I have textareas and other input fields in a form. If the user is focused on a textarea and presses the enter key to create a newline, the old alert will still pop up. The button that was clicked to create the alert is no longer in focus when this occurs.

from sweetalert2.

limonte avatar limonte commented on May 18, 2024

reproduce that issue with https://jsfiddle.net/ so I can look into it, thanks

from sweetalert2.

nickfederighi avatar nickfederighi commented on May 18, 2024

Here's a link to the fiddle.
https://jsfiddle.net/nickfederighi/t8w2eLma/11/
Let me know if you have any questions. Thanks for your help.

from sweetalert2.

limonte avatar limonte commented on May 18, 2024

Thank you for the really great fiddle which is helped me to resolve this issue!

from sweetalert2.

limonte avatar limonte commented on May 18, 2024

https://github.com/sweetalert2/sweetalert2/releases/tag/v0.2.8

from sweetalert2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.