From 3bf43a74841db6011e1b612bfd31ba4761a8fe95 Mon Sep 17 00:00:00 2001 From: Dean Attali Date: Wed, 9 Jun 2021 14:05:33 -0400 Subject: [PATCH] fix radio buttons and checkboxes rendering incorrectly; closes #55 --- DESCRIPTION | 2 +- NEWS.md | 7 ++++--- inst/www/css/shinyalert.css | 10 +++++++++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 8e729b1..7fde158 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: shinyalert Title: Easily Create Pretty Popup Messages (Modals) in 'Shiny' -Version: 2.0.0.9001 +Version: 2.0.0.9002 Authors@R: c( person("Dean", "Attali", email = "daattali@gmail.com", diff --git a/NEWS.md b/NEWS.md index 6e2669a..816a938 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,9 +2,10 @@ - **BREAKING CHANGE** It's no longer required to call `useShinyalert()` in the UI. If you still want to explicitly pre-load the UI scripts, use `useShinyalert(force=TRUE)` (#47) - **BREAKING CHANGE** The `rmd` parameter of `useShinyalert()` is no longer used. If you still want to call `useShinyalert()` (which you don't need to) then you have to remove the `rmd` argument -- Fixed bug: tall modals did not have a scrollbar and you couldn't see the entire content (#44) -- Fixed bug: long strings in the modal got cut off (#53) -- Fixed bug: vertical scrollbar incorrectly appeared when dialog has no buttons (#49) +- Fixed UI bug: tall modals did not have a scrollbar and you couldn't see the entire content (#44) +- Fixed UI bug: long strings in the modal got cut off (#53) +- Fixed UI bug: vertical scrollbar incorrectly appeared when dialog has no buttons (#49) +- Fixed UI bug: radio buttons and checkboxes did not render correctly (#55) - New feature: added `session` parameter to allow advanced uses of shinyalert where the Shiny session isn't immediately accessible (thanks @galachad) # shinyalert 2.0.0 (2020-09-11) diff --git a/inst/www/css/shinyalert.css b/inst/www/css/shinyalert.css index c66599f..fa1a0d6 100644 --- a/inst/www/css/shinyalert.css +++ b/inst/www/css/shinyalert.css @@ -1,10 +1,18 @@ /* Ensure the modal has a vertical scrollbar if it's too tall */ -.sweet-alert{ +.sweet-alert { max-height: calc(100% - 20px); overflow-y: auto; overflow-wrap: break-word; } +/* Fix the look of radio buttons and checkboxes that are too big */ +.sweet-alert input[type="radio"], +.sweet-alert input[type="checkbox"] { + height: auto; + margin-top: 4px; + width: auto; +} + /* Remove the error section as it's unused but causes a vertical scrollbar when there are no buttons */ .sweet-alert .sa-input-error { display: none;