shiny icon indicating copy to clipboard operation
shiny copied to clipboard

Fix #2797 - outputinvalidated events missed for outputs not in DOM

Open earlygrey opened this issue 5 years ago • 1 comments

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.

earlygrey avatar Apr 14 '20 12:04 earlygrey

CLA assistant check
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.

CLAassistant avatar Apr 14 '20 12:04 CLAassistant

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.

cpsievert avatar May 01 '24 22:05 cpsievert