How To Focus On Textinput Field In Alert Combined With Modaldialog In R?
I am building a Shiny app in which a user can open a modalDialog by clicking on points in a plot. The modalDialog contains a plot of the raw data behind the point clicked. The user
Solution 1:
i don't know if you already fix the problem, but, here is my answer.
I had the same problem, that's because tabindex="-1"
on Bootstrap modal.
How i fixed:
// 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 hope this help you.
Post a Comment for "How To Focus On Textinput Field In Alert Combined With Modaldialog In R?"