question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

captureScreen did not take modal opened

See original GitHub issue

Im open a modal on my app, and when user click on button inside that modal, i trigger capturescreen function but it seems only capture my screen without the modal. is this a bug or anything I did wrong ?

captureScreen({ format: "jpg", quality: 0.8 }) .then( (uri) => { console.log("Image saved to", uri) }, error => console.error("Oops, snapshot failed", error) );

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:3
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
MrHazimAlicommented, May 3, 2018

This is the sample code @Taym95 Thanks!

https://es6console.com/jgpxn4cx/

sorry, could not paste the code directly here… have trouble of highlighting it.

0reactions
leojim06commented, Jan 20, 2021

To capture your modal alone, use CaptureRef instead of CaptureScreen. Then in your code, create a ViewShot element that wraps round your modal. This tells the library where to capture. If anyone is still interested in this, I could modify @MrHazimAli 's snippet to reflect the changes

I am interested, Can you modify the snippet with a functional component? I did what you said and I get the error Argument appears to not be a ReactComponent. Keys: current

Maybe, the functionality I’m looking for is to capture the View of a modal that is hidden.

Read more comments on GitHub >

github_iconTop Results From Across the Web

(Modal) Dialog Window not captured when taking screenshot
I have a C# project with WPF and CAB where I want to take a screenshot of the entire screen including a modal...
Read more >
Issue with taking screenshot while the jscript dialog box is ...
Expected: When the alert box is being opened-take the screenshot. Actual: Getting unhandled exception-Modal dialog present. Webdriver: 2.23.
Read more >
The Hidden Trick for Capturing Document-Modal Dialogs in ...
They do. In any application, open Help (from the Help menu). Type “screenshot” in the search field. Choose “Take screenshots or screen ...
Read more >
Create/Screen Shot (Windows): capturing a modal ... - GitLab
Open any application then any Modal dialog in this application. ... Release the mouse button : a screenshot of IE is taken instead...
Read more >
It's not possible to take a new screenshot with this tool. - Visual ...
That's a problem because if the screenshot I want to send includes a modal window, I can't press the “report problem” button. If...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found