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

Cannot type in input field if sweetalert trigger in Offcanvas #2667

Closed
jaimefuhr opened this issue Sep 1, 2023 · 1 comment
Closed

Cannot type in input field if sweetalert trigger in Offcanvas #2667

jaimefuhr opened this issue Sep 1, 2023 · 1 comment

Comments

@jaimefuhr
Copy link

Current behavior

Sweetalert2 11.7.27
Bootstrap 5.3.0-alpha3

I have an Offcanvas with a button that fires a Sweetalert with an Input type of 'text'. The dialog is shown but the input field is disabled.

Moving the same button outside of the Offcanvas works as expected.

Expected behavior

Should be able to type in the Input field if Sweetalert is fired in an offcanvas.

Live demo !!! THIS FIELD IS REQUIRED !!!

JSFiddle:

https://jsfiddle.net/jaimefuhr/v14qe7rp/4/

@limonte
Copy link
Member

limonte commented Sep 1, 2023

Thanks for the nice issue report @jaimefuhr 🙌

This issue is similar to #374

The solution for Bootstrap 5 offcanvas is:

$.fn.offcanvas.Constructor.prototype._initializeFocusTrap = () => ({ activate: () => { }, deactivate: () => { } });

proof: https://jsfiddle.net/2fhbyn36/

@limonte limonte closed this as completed Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants