I am using a popup window in R Shiny with the following code:
library(shiny)
ui = basicPage(
actionButton("show", "Show modal dialog"),
textAreaInput(
inputId = 'textEditor',
label = NULL,
value = "R is a free software environment for statistical computing and graphics.",
height = "300",
resize = "none"
)
)
server = function(input, output)
{
observeEvent(input$show,
{
showModal(modalDialog(
title = "Add the following text in the box at the left:",
"The R language is widely used among statisticians and data miners.",
footer = tagList(
actionButton("ok", "OK")
)
))
})
observeEvent(input$ok,
{
removeModal()
print("OK")
})
}
shinyApp(ui = ui, server = server)
It strikes me that when the popup window is open, you can not use the elements on the background. The whole background is greyed-out.
In most cases this may be the right behaviour, but in my case I would like to be able to edit the text in the left window while the popup window is open.
Is it possible to make this possible? If so, how?
I tried adding this in the ui:
tags$head(tags$style(HTML("
.modal {
position: static !important;
}"
)))
but that made it even worse, while it turned out to be the solution in html (see: https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_modal ).
Any help is much appreciated.