shiny
                                
                                
                                
                                    shiny copied to clipboard
                            
                            
                            
                        Fix #2797 - outputinvalidated events missed for outputs not in DOM
This is a PR for the issue identified in https://github.com/rstudio/shiny/issues/2797.
The PR contains 3 commits - the first contains the changes to the source js files, the second adds the built js files, the third adds the description to NEWS.md.
I think the code is self explanatory and I describe it a little in the issue. It creates an array called $invalidateOutputQueue, which flags shiny:outputinvalidated events corresponding to html elements not in the DOM (eg in a closed modal). It triggers the event if the output is later added (eg the modal opened) and if the flag has not already been cleared (by shiny:value or shiny:unbound events).
I've run test-all.R:
> test_check("shiny")
══ testthat results  ═══════════════════════════════════════
[ OK: 1055 | SKIPPED: 6 | WARNINGS: 0 | FAILED: 0 ]
Please let me know if there's anything I've missed which I should have done, or anything I've done incorrectly.
 
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
Thanks for this impressive PR @earlygrey! Turns out, there's a few different scenarios in which .recalculating class doesn't get properly properly attached to recalculating output. #4039 aims to fix those scenarios, including #2797, so I'll be closing this.