ebailey78 / shinyBS

Twitter Bootstrap Components for Shiny
182 stars 47 forks source link

Popover stops responding after user interaction with element #33

Open bwaismeyer opened 9 years ago

bwaismeyer commented 9 years ago

Hi again, Eric!

I'm seeing another case of odd popover behavior.

When you initially interact with a popover, it works fine. However, if you interact with the element the popover is attached to (e.g., select a choice in a radioButtons element), the popover stops responding. This doesn't always happen on the first few interactions but it does always seem to happen fairly quickly.

This can be observed using the same example I used in my last issue.

popover works

library(shiny)
shinyApp(
    ui = navbarPage(
        "The Case Outcome Simulator",

        # using COS to explore trends per predictor ("Explore Mode")
        tabPanel("Explore Mode", fluidPage(
            # define user tools in the first column
            # width = 3 of 12 (Shiny divides the horizontal space up into 12 sections)
            column(3, 
                   wellPanel(               
                       radioButtons("x_axis_choice", label = h4("Select X-Axis"), 
                                    choices = c("one", "two", "three")),

                       bsPopover("x_axis_choice",
                                 title = "Variable Definitions.",
                                 content = "<p> So many puppies! How do they make me feel? <br> I heart them. SO VERY VERY VERY VERY VERY SO VERY VERY VERY VERY VERY SO VERY VERY VERY VERY VERY SO VERY VERY VERY VERY VERY SO VERY VERY VERY VERY VERY much. </p>",
                                 trigger = "click",
                                 placement = "bottom")
                   )
            ),
            column(9,
                   textOutput("return_stuff")
            )
        ))
    ), 
    server = function(input, output, session) {
        output$return_stuff <- renderText({input$"x_axis_choice"})
    }
)
bwaismeyer commented 9 years ago

Sorry - I meant to update my post before submitting.

I can state more specifically how to trigger the error:

ebailey78 commented 8 years ago

I realize this issue is over a year old and I apologize for not responding sooner. I haven't been able to devote any time to this project. I tried to recreate the problem you are describing and could not. If you are still having issues please let me know and I will try to look into it further.

bwaismeyer commented 8 years ago

Hey Eric! I'm so mad that you didn't immediately respond to all my nitpicky requests about the work you shared for free. What am I not paying you for?! ; )

But seriously, no worries about delays. I really appreciate you sharing your time and nifty product and life happens! I've got no complaints. =)

My current package set is fairly updated and I can no longer recreate the problem either. At this point, the behavior feels a bit clunky but the popups no longer break (in my toy example, anyways).

By "clunky", I mean that it's still not quite consistent which clicks open and close the pop-up. Also, having the pop-up open and close when switching to new radio buttons feels a bit odd.

Example of consistency (using the example above): Click on the buttons directly or on the greyspace around the buttons. The popup opens and closes. Now click on the button text. Whatever state the popup is in is maintained (even when the button selection itself changes).

Example of radio button switching: Click through the buttons for one, two, and three. Open, close, open. If I were unfamiliar with what triggered the open/close I'd be confused why some buttons have a definition but not others.

I hope this helps and thanks again!