0

I have a link to open a dialog box (showModal(modalDialog()...) within a card working fine, however, when I expand the card and click on the same link, the dialog box appears behind the card expanded screen. Is there a way to show the dialog in front of the expanded card?

Reprex:

library (bslib)
library(shiny)

ui <- page_navbar(
  
  card(actionLink("dialog_link", label = "Open Dialog"),
       full_screen = TRUE)
)

server <- function(input, output, session) {
  
  observeEvent(input$dialog_link, {
    showModal(modalDialog(
      title = "My Dialog Box",
      easyClose = TRUE,
    ))
  })
  
}

shinyApp(ui, server)

bslib: 0.4.2.9000, shiny: 1.7.4

Scopinho
  • 16
  • 2
  • Just for reference.....the problem was on the z-index. Modal had a lower value (1050) than the --bslib-fullscreen-overlay (1069). Setting higher value for .modal (i.e .modal {z-index: 1150;}) is a workaround. – Scopinho Jun 27 '23 at 02:26

0 Answers0