Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen moves when confirmSweetAlert is closed. #645

Open
reisner opened this issue Nov 2, 2023 · 1 comment
Open

Screen moves when confirmSweetAlert is closed. #645

reisner opened this issue Nov 2, 2023 · 1 comment

Comments

@reisner
Copy link

reisner commented Nov 2, 2023

Hi there,

In the example below, when you click on a datatable row, a sweetalert opens. When you close this window, the screen moves down to the table. Is this a bug with confirmSweetAlert? If I remove the tabsetPanel, the issue goes away, so there is some kind of interaction happening here.

library(shiny)
library(shinyWidgets)
library(DT)

ui <- bootstrapPage(
  "Just", br(), "Some", br(), "Filler", br(), br(), br(), br(), br(), br(),
  tabsetPanel(
    tabPanel("Data", DT::dataTableOutput("results"))
  )
)

server <- function(input, output) {
  output$results <- DT::renderDataTable({
    data.frame(a = runif(500), b = runif(500)) |>
      DT::datatable(selection = 'single', options = list(pageLength = 100))
  })

  observeEvent(input$results_rows_selected, {
    shinyWidgets::confirmSweetAlert(inputId = "info")
  })
}

shinyApp(ui = ui, server = server)

Before:
Fullscreen_2023-11-02__3_20_PM

After:
Fullscreen_2023-11-02__3_22_PM

Tested on Mac OSX (Chrome and Safari).
Package Info:

R 4.3.0
shiny 1.7.5.1
shinyWidgets 0.8.0
DT 0.30

Thanks for the great package!

@pvictor
Copy link
Member

pvictor commented Nov 23, 2023

I don't have a solution... This does not seem to occur in Firefox or when using latest Bootstrap assets via {bsllib} (e.g. bslib::page_fluid()).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants