After login, the default value of the placeholder text in a file upload UI element, "No file selected" is being over written by the username of the authenticated user. This only happens in Firefox, and not in Chrome or RStudio browser.
In Chrome (Version 94.0.4606.81 (Official Build) (x86_64)), Desired behavior:
In Firefox (93.0 (64-bit)), Undesired behavior:
Minimal Working Example:
library(shiny)
library(shinymanager)
#login data
credentials <- data.frame(
user = c("demo_user"),
password = c("password"),
stringsAsFactors = FALSE
)
# Upload UI element
uploadUI <- function(id) {
# Input: Select a file ----
fileInput(inputId = "uploaded_files",
label = "Choose .zip file(s)",
placeholder = "No file selected")
}
# Define UI for application
ui2 <- fluidPage(title = "Example", uploadUI(1))
# Wrap UI with secure_app
ui <- secure_app(ui = ui2, choose_language = F)
# server
server <- function(input, output) {
# check_credentials returns a function to authenticate users
res_auth <- secure_server(check_credentials(credentials))
}
# Run the application
shinyApp(ui = ui, server = server)
After login, the default value of the placeholder text in a file upload UI element, "No file selected" is being over written by the username of the authenticated user. This only happens in Firefox, and not in Chrome or RStudio browser.
In Chrome (Version 94.0.4606.81 (Official Build) (x86_64)), Desired behavior:![Screen Shot 2021-10-13 at 2 58 00 pm](https://user-images.githubusercontent.com/20785842/137065115-80227ce5-308c-4588-a8ba-f3f85b96ae14.png)
In Firefox (93.0 (64-bit)), Undesired behavior:![Screen Shot 2021-10-13 at 2 58 05 pm](https://user-images.githubusercontent.com/20785842/137065103-e42ebe1c-ea64-463f-9598-f45dfffbdc02.png)
Minimal Working Example: