daattali / shinyalert

🗯️ Easily create pretty popup messages (modals) in Shiny
https://daattali.com/shiny/shinyalert-demo/
Other
241 stars 26 forks source link

Moving with Tab between Inputs doesn't work #64

Closed malte610 closed 2 years ago

malte610 commented 2 years ago

There is bug in SweetAlert that doesn't allow to move between Inputs with the tab button. I found the following two issues, but I lack knowledge in JavaScript to implement the proposed fixes properly.

SweetAlert Issue 127 SweetAlert Issue 391

In Issue 127 it is suggested that changing "closeOnConfirm" to true solves the issue but that didn't work for me.

Reprex:

library(shinyalert)

ui <- fluidPage(
  fluidRow(
    useShinyalert(),
    actionButton("btn", "test")
  )  
)

server <- function(input, output) {
  observeEvent(input$btn, {
    shinyalert(html = TRUE,
               text = tagList(
      textInput("name", "What's your name?", "Dean"),
      numericInput("age", "How old are you?", 30),
    ))
  })
}

shinyApp(ui = ui, server = server)
daattali commented 2 years ago

Thanks for the report. Unfortunately, any bug present in sweetalert is going to be present here as well. It's not clear to me whether this is easily fixed and how to fix it.

lisiarend commented 1 year ago

This is still a problem that would be good to be considered...

daattali commented 1 year ago

Please see my previous reply. I cannot fix this, the developers of sweetalert knew about this bug for 8 years and haven't fixed it, I can't do it on my end.