Buggy cursor behavior in Shiny numericInput in Chrome browser

I recently noticed a strange behavior in numericInput() fields in Chrome browsers. The cursor does not reliably go where you click. It goes roughly two digits to the right of where you click.

com-image

Here is an example app that demonstrates this, with the code for the example below. I've also replicated this behavior in the apps in the Shiny Gallery as well, so it's not isolated to my app. It does seem to be isolated to the Chrome browser though. I just noticed it within the last week, so it's possible it's related to a Chrome update. The cursor in the textInput() field works as expected. I've also determined that it is not related to whether the input value is higher or lower than the max value defined in numericInput. If anyone has a solution, it would be much appreciated!

library(shiny)

ui <- fluidPage(
    headerPanel("Demoing numericInput cursor issue, only in Chrome browser"),
    textInput("text", "", value = "Clicking within the text input works"),
    numericInput("numeric", "Clicking within numeric input does not move cursor where you click", value = 100000, max = 100000000)
)

server <- function(input, output) {
}

shinyApp(ui = ui, server = server)
1 Like

I can reproduce your issue, it seems like a bug to me, I think it would be worthy to file an issue on the Github repo

2 Likes

Looks like this is actually a Boostrap issue. Hopefully it gets resolved soon.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.