shinyWidgets icon indicating copy to clipboard operation
shinyWidgets copied to clipboard

Failed to receive input from radioGroupButtons in particular Chrome enviornment

Open doncqueurs opened this issue 2 years ago • 3 comments

I have developed an app that uses ShinyWidgets's radioGroupButtons. In general this seems to be working well, but my client organization has reported one problem that I have not been able to reproduce in my environment that puzzles me.

They are using Chrome as a browser in a remote desktop environment and this is the context in where it causes problems. When I use the same version of Chrome on my computer I do not have the same problem. Neither does this behavior show in all other browsers that I have tried including Opera, Edge and Firefox.

Analyzing the problem it seems to go wrong that when the users select a button in the radioGroupButtons that the input$ isn't received on the server and that therefore the reactivity isn't triggered. I have the feeling that somewho the input isn't send or something along those ways. I am curious to hear whether anybody has been aware of such a behavior and maybe have an idea about a resolution or things to check/validate in order to find a resolution.

The shiny application is running on an environment with R version 4.2.0 with shiny_1.7.1 and shinyWidgets_0.7.0. The Chrome version is 103.0.5060.66 (Official Build) (64-bit). In the Javascript settings "< > Sites can use Javascript" is selected.

My apologies for not adding a reproducible example. It is not added because I simply have not been able to reproduce it myself.

doncqueurs avatar Jul 22 '22 06:07 doncqueurs

Not sure how to help ^^ 2 questions to maybe try to narrow the problem:

  • do you use a custom theme with bslib package ?
  • has your UI HTML code been previously generated and loaded in some way?

pvictor avatar Aug 02 '22 07:08 pvictor

Strangely I just noticed I'm getting this issue on firefox 104.0 with shiny 1.7.2. and shinyWidgets 0.7.2. but it's working fine on chrome and brave browser for me.

The verbatimTextOutput in the app below shows NULL on firefox and I can see in the HTML that the div is missing the "shiny-bound-input" class, whereas it is present on chrome and brave browser.

library(shiny)
library(shinyWidgets)

ui <- fluidPage(
  radioGroupButtons("x", choices = c("A", "B", "C")),
  verbatimTextOutput("y")
)

server <- function(input, output, session) {
  output$y <- renderPrint({
    input$x
  })
}

shinyApp(ui, server)

PaulC91 avatar Aug 24 '22 14:08 PaulC91

I had an issue very similar to this one. Unresponsive radioGroupButtons, missing "shiny-bound-input" class, but the issue only occurred for rendered R Markdown What went wrong was the .Rmd file was rendered for an older version of shinyWidgets (0.7.6) and then opened with the latest version (0.8.0). Opening the output with the older shinyWidgets version worked, as well as rendering the .Rmd file with the correct package version.

marjolein-zwerver avatar Jan 03 '24 12:01 marjolein-zwerver