-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Description
When an application is bookmarked and restored selectizeInputs can lose their values.
An example follows.
ui <- function(request) {
shiny::fluidPage(
shiny::selectizeInput(
"my_selectize",
"Selectize",
character(0L),
multiple = TRUE,
options = list(create = TRUE)
),
shiny::verbatimTextOutput("my_text"),
shiny::bookmarkButton()
)
}
server <- function(input, output, session) {
output$my_text <- shiny::renderPrint(input$my_selectize)
}
shiny::shinyApp(ui, server, enableBookmarking = "url")
Run the application.

In the selectizeInput enter "a,b,", so that the input's value is c("a", "b")
.

Click "Bookmark...".

Restore the application.

The input's value is NULL
but ought to be c("a", "b")
.
The fault was observed when the browser was Firefox 141.0 (64-bit) and sessionInfo()
was as follows.
R version 4.3.3 (2024-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 24.04.2 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so; LAPACK version 3.12.0
locale:
[1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8
[5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8
[7] LC_PAPER=en_GB.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
time zone: Europe/London
tzcode source: system (glibc)
attached base packages:
[1] stats graphics grDevices datasets utils methods base
loaded via a namespace (and not attached):
[1] compiler_4.3.3 tools_4.3.3 renv_1.1.5
Metadata
Metadata
Assignees
Labels
No labels