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
input field not functional when used on top of a bootstrap modal #412
Comments
I had the same issue. What I ended up doing was 'hiding' the modal with modal.hide, opening the swal, doing whatever you need with the inputValue, then show the modal with modal.show on success or cancel of the swal. |
Dan Sent from Outlook On Mon, Aug 10, 2015 at 6:52 AM -0700, "Dan Kaufman" notifications@github.com wrote: I had the same issue. What I ended up doing was 'hiding' the modal with modal.hide, opening the swal, doing whatever you need with the inputValue, then show the modal with modal.show on success or cancel of the swal. Hope this helps. — |
Hi mteichtahl, Did you stil post the fix? I can not find it. Would really help! |
Hi, Same issue with sweet alert (as well as sweetalert2). Cannot figure out the problem yet. Really strange. |
I have the same problem...any one have a solution? |
hi, this allow to show input placeholder, but is not fix to focus on input... |
I have the same problem, can't find the fix... |
+1 |
I found that the culprit is The fix: // call this before showing SweetAlert:
function fixBootstrapModal() {
var modalNode = document.querySelector('.modal[tabindex="-1"]');
if (!modalNode) return;
modalNode.removeAttribute('tabindex');
modalNode.classList.add('js-swal-fixed');
}
// call this before hiding SweetAlert (inside done callback):
function restoreBootstrapModal() {
var modalNode = document.querySelector('.modal.js-swal-fixed');
if (!modalNode) return;
modalNode.setAttribute('tabindex', '-1');
modalNode.classList.remove('js-swal-fixed');
} |
I have a nearly identical issue, except it only occurs if the modal is so tall that it is scrollable on the y-axis. |
Please help me... |
Cinamonas's tab fix didn't work for me :( |
+1 Thank you @Cinamonas |
Would you show me some examples? |
It works for me :) |
The fix generates a syntax error in IE11 |
@caleb87, I've updated the snippet not to use arrow functions and |
This seems to be an issue with Bootstrap so I will close for now. Thanks for the fix @Cinamonas! |
Hi , I have faced the same issue . |
Does anyone know how to apply this fix in R? I'm having the same issue, but my attempts to convert it to R have failed so far |
genius |
For those who have more than one modal, you can use: |
It doesn't work for me, I have the same issue. can anyone help me or tell me what's my problem? fixBootstrapModal() |
I am currently calling swal from within a bootstrap modal. It seems that the buttons work but the input of the swal is not accepting a click nor does it ever take focus. I'm wondering if this is a known issue or possibly something I'm doing.
The text was updated successfully, but these errors were encountered: