-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
Basic Example - Not Working in Firefox #66
Comments
I just spent over an hour trying to figure out the problem, but I still don't understand why FF is behaving differently. It seems like when FF doesn't recognize that the shinyjs global variable exists when it tried to add new functions. I'm very confused as to why it acts like this, it feels like a bug in FF. I spent almost two hours looking into this and it just doesn't make sense, I really feel like it's a bug in FF. I might try to come back to it later, but right now I don't know if that's fixable in the near future, sorry! |
Many thanks Dean for looking into this. For now I'll use a MutationObserver function in index.html to watch for changes in a hidden RShiny output div - and apply a CSS property to multiple targetDiv's based on the value of the output div. It doesn't use your package, but it works well.
|
We just ran into a similar problem in Firefox. We solved it by injecting the shiny event handlers after the script tag here: https://github.com/daattali/shinyjs/blob/master/R/utils.R#L39 |
@judas-christ can you share more details on what exactly you did to get it to work? |
This is our fork where it works: Olink-Proteomics@d4273fa The issue seems to be that the shiny::tags$script(shiny::HTML(controllers)), Note that while this works for us, we haven't tested it extensively so it might cause issues with other setups. |
Thanks, that's helpful! |
As mentioned last night, I'm currently working on re-writing shinyjs to make it much easier for users. It should now be simpler to include it in an htmlTemplate, you don't need to use the inject script anymore, you don't even need to do anything in the html. All you need to do now is call I haven't documented it yet because this is still a work in progress so I'm hoping to simplify it even more. I would appreciate if you can try this method and let me know if it works or not. |
Hi Dean
I'm only a few hours in to learning your project. With your simple PageCol example, if I run the ui = fluidPage(... ) scenario, then everything works nicely across browsers, Firefox included.
However, if I use a www/index.html file for the UI (which I require for creating a custom Dashboard), and do the extra steps required, then the example code works nicely in RStudio and Chrome, but not Firefox. Please see attached screenshot for the Firefox console errors.
Have you come across this issue before in FF? Hopefully its reproducible. I would welcome any insights or suggestions.
My Shiny App file structure is:
global.R
server.R
www/index.html
Best regards
Mark
The text was updated successfully, but these errors were encountered: