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

Pressing ESC when a modal is open in a gadget causes the gadget to close #1453

Closed
daattali opened this issue Nov 1, 2016 · 0 comments · Fixed by #1523
Closed

Pressing ESC when a modal is open in a gadget causes the gadget to close #1453

daattali opened this issue Nov 1, 2016 · 0 comments · Fixed by #1523
Assignees

Comments

@daattali
Copy link
Contributor

daattali commented Nov 1, 2016

When pressing ESC in a modal, it should close the modal (assuming easyClose=TRUE). When pressing ESC in a gadget, it should close the gadget. However, it feels wrong to do both at the same time. I think when a modal is open in a gadget, ESC should close the modal without closing the gadget.

Example:

ui <- miniUI::miniPage(
  miniUI::gadgetTitleBar("test"),
  actionButton("showmodal", "Show modal")
)

server <- function(input, output, session) {
  observeEvent(input$showmodal, {
    showModal(modalDialog(
      "Press ESC",
      easyClose = TRUE
    ))
  })
}
runGadget(ui, server)

I'm not sure if to consider this a shiny issue or a miniUI issue

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

Successfully merging a pull request may close this issue.

3 participants