从autocapitalizing

时间:2017-06-19 23:29:13

标签: r shiny autocorrect

我用简单的shiny::textInput()碰到了一个小皱纹。以下是https://shiny.rstudio.com/gallery/widget-gallery.html的textInput小部件示例的略微调整版本。

library(shiny)

ui <- fluidPage(

  # Copy the line below to make a text input box
  textInput("text", label = h3("Text input"), value = ""),

  hr(),
  fluidRow(column(3, verbatimTextOutput("value")))

)


server <- function(input, output) {

  # You can access the value of the widget with input$text, e.g.
  output$value <- renderPrint({ input$text })

}
# Run the application 
shinyApp(ui = ui, server = server)

当我在RStudio窗口中运行此示例,并在textInput()框中键入单个小写字母时,会弹出一个自动更正选项卡,使其成为一个大写字母。这是一个问题,因为此字段将用于(通常)单个小写字母的SQL查找中。它也发生在Safari中,点击&#34;在浏览器中打开&#34;按钮,直到我进入并从Autofill |下的网站列表中删除了127.0.0.1其他表格。所以,不是交易破坏者,但我想在其他人运行应用程序时阻止它发生。它只能在本地运行,但并不总是在Mac上运行。

在研究这个问题时,我发现有HTML属性可以关闭自动,但是我必须手动重新创建整个textInput?

更新:我刚刚在PC上用RStudio(相同版本)尝试过,并且在RStudio窗口中没有自动更正,或者当我将其移动到Chrome时。所以我可以很容易地解决它。

我正在运行RStudio 1.0.143和

R version 3.4.0 (2017-04-21)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.5

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] lubridate_1.6.0 shiny_1.0.3     RSQLite_1.1-2  

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.11      digest_0.6.12     mime_0.5          R6_2.2.1          xtable_1.8-2     
 [6] jsonlite_1.5      DBI_0.6-1         magrittr_1.5      stringi_1.1.5     DT_0.2           
[11] tools_3.4.0       stringr_1.2.0     htmlwidgets_0.8   httpuv_1.3.3      yaml_2.1.14      
[16] compiler_3.4.0    sourcetools_0.1.6 memoise_1.1.0     htmltools_0.3.6 

0 个答案:

没有答案