Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Z-index of modals has problems with selectizeInput #3448

Closed
apalacio10 opened this issue Jun 26, 2021 · 1 comment · Fixed by #3450
Closed

The Z-index of modals has problems with selectizeInput #3448

apalacio10 opened this issue Jun 26, 2021 · 1 comment · Fixed by #3450
Milestone

Comments

@apalacio10
Copy link

Hello,

The Z-index of modals has problems with selectizeInput in the developer version. The drop-down list appears behind the modal.

imagen

library(shiny)

theme <- bslib::bs_theme(version = 4,bootswatch = "cyborg",bg="#323232",fg="#FFFFFF","body-bg"="#323232",primary = "#002860",
                         secondary  = "#6E6E6E",success = "#02A502",info="#00AADD",warning = "#FA9300",danger = "#F0302B","input-border-color"="#000000",
                         base_font = "Helvetica Neue",heading_font = "Helvetica Neue")

ui <- fluidPage(theme = theme,

    actionButton("test","Test")
)

server <- function(input, output) {

    observeEvent(input$test,{
      
        showModal(
            modalDialog(
                title ="Test",
                size="l",
                selectizeInput("bins",
                               "Number of bins:",
                               choices=c(1,2,3,4,5)),
                easyClose = F)
            )

    })
    
}

shinyApp(ui = ui, server = server)
@cpsievert
Copy link
Collaborator

cpsievert commented Jun 28, 2021

Thanks, looks like this issue was introduced by #3413 (it has nothing to do with bslib). Here's a more minimal example:

library(shiny)
ui <- fluidPage(
  actionButton("test","Test")
)

server <- function(input, output) {
  
  observeEvent(input$test,{
    
    showModal(
      modalDialog(
        title ="Test",
        size="l",
        selectizeInput("bins",
                       "Number of bins:",
                       choices=c(1,2,3,4,5)),
        easyClose = F)
    )
    
  })
  
}

shinyApp(ui = ui, server = server)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants