Skip to content

Output elements not triggered when nested in modal #152

@MJaegerRCH

Description

@MJaegerRCH

I've noticed an issue where output elements that are defined within modals are not displaying.

Environment: Posit Workbench 2025.5.1
R: 4.4.3

Minimal example to reproduce the issue:

library(shiny)
library(shinyBS)

ui <- fluidPage(
  actionButton("myButton", "Open modal"),
  
  bsModal(
    id = "myModal",
    title = "Example modal",
    trigger = "myButton",
    size = "large",
    
    actionButton(
      "btnRun", "Run",
      icon = icon("person-running", lib = "font-awesome")
    ),
    
    uiOutput("myoutput")
  )
)

server <- function(input, output, session) {
  
  output$myoutput <- renderUI({
    req(input$btnRun)
    HTML("Hello!")
  })
}

shinyApp(ui, server)

I expect the Run button to display the "Hello!" output, but instead it does nothing.

Any input or suggestions would be appreciated. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions