diff --git a/R/config.R b/R/config.R index 4e9eb4c0..0c84020d 100644 --- a/R/config.R +++ b/R/config.R @@ -110,12 +110,10 @@ extract_html_pages <- function( if (!is.null(show_if)) { if (question_id %in% show_if$targets) { current_style <- xml2::xml_attr(container, "style") - current_style <- if (is.na(current_style)) "" else current_style - new_style <- paste(current_style, "display: none;", sep = " ") + new_style <- gsub("display:\\s*block;", "display: none;", current_style, ignore.case = TRUE) xml2::xml_attr(container, "style") <- new_style } } - question_containers[[i]] <- container } diff --git a/R/ui.R b/R/ui.R index 057e8c8a..da1ad099 100644 --- a/R/ui.R +++ b/R/ui.R @@ -800,7 +800,7 @@ sd_output <- function(id, type = NULL, display = "inline", wrapper = NULL, ...) return(shiny::div( id = paste0("placeholder-", id), `data-question-id` = id, - class = "question-container reactive-question-placeholder", + class = "question-container", shiny::uiOutput(id) )) }