dreamRs / dreamRs/capture

Capture fails 'body' capture in conjunction with bslib package

Open
#4 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
32
Forks
3
PR merge metrics
No merged PRs in 30d

Description

I added the bslib package (custom CSS themes) to my R shiny app but have run into an issue with the 'Capture' download button. Without the bslib package, the Capture package works perfectly fine without any issues. Strangely, I don't have a problem until after I upload a csv file for manipulation (app takes a file and calculates stats on it). Said another way, Capture will screenshot the entire web page when there is no file is uploaded but will not work afterwards. Perhaps it's a CSS targeting issue? I'm running the app on Google Chrome. Here is the breakdown:

1. Capture works fine to download an image of the full screen prior to the csv file being loaded.
`,capture::capture(selector = "body"
, filename = "all-page.png"
, icon("camera-retro")
, "Take screenshot of entire page"
, class = "btn-primary")`

2. After the file is uploaded, the capture function stops working. Below is the inspection error I receive from Google Chrome.
`capture.js:65 Capture: oops, something went wrong!
Event
bubbles: false
cancelBubble: false
cancelable: false
composed: false
currentTarget: null
defaultPrevented: false
eventPhase: 0
isTrusted: true
path: [img]
returnValue: true
srcElement: null
target: null
timeStamp: 33897.700000047684
type: "error"
[[Prototype]]: Event`

Am I missing something here? I can't see why capture would work before the csv file is loaded and not afterward. The app I'm running this on is quite complex, therefore, a reprex would not be useful.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.