You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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")
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.
The text was updated successfully, but these errors were encountered:
Blocktt
changed the title
Capture fails 'body' capture in conjunction with bslib and leaflet packages
Capture fails 'body' capture in conjunction with bslib package
Oct 7, 2021
Not sure how I can help you without being able to reproduce the error.
Without bslib it works fine even after uploaded a file ?
You use Bootstrap 4 with bslib ?
Otherwise, maybe you will have better luck with shinyscreenshot ?
I understand... Perhaps it's best to just not use bslib because I'd prefer to keep the Capture functionality. Without bslib, the Capture function works completely fine and has no issues after a file is uploaded. I believe bslib uses Bootstrap 4 or 5 but honestly, I'm not sure the difference or the effects those differences would have.
Either way, somehow to the bslib package interferes with the Capture function but there isn't a clear error that is produced so it's likely on the HTML side of things. Will probably need to just avoid the combination of packages.
Thanks,
Ben
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:
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")
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.
The text was updated successfully, but these errors were encountered: