Skip to content

Commit

Permalink
Inject shinyjs event handlers after scripts
Browse files Browse the repository at this point in the history
The original order caused an not defined-error in Firefox where the `shinyjs` object was called before being instantiated.
  • Loading branch information
judas-christ committed Oct 17, 2022
1 parent dec5edc commit d4273fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ setupJS <- function(jsFuncs, script, text, ...) {
shinyjsContent <-
shiny::singleton(
insertHead(
# add the message handlers
shiny::tags$script(shiny::HTML(controllers)),
# add the actual javascript code
shinyjsInlcudeScript(script),
shinyjsInlineScript(text),
# add the message handlers
shiny::tags$script(shiny::HTML(controllers)),
# add any extra tags
...
)
Expand Down

0 comments on commit d4273fa

Please sign in to comment.