Coder Social home page Coder Social logo

Comments (6)

noahehall avatar noahehall commented on May 28, 2024 1

will send a PR shortly

from react-cosmos.

skidding avatar skidding commented on May 28, 2024

Hi @noahehall,

I'm not sure what the fullscreen functionality does in your app, but can you try something for starters: Can you open that fixture in full screen mode in Cosmos and see if you still get that error?

Basically press this button here and your fixture will break outside the Cosmos UI shell:
image

from react-cosmos.

skidding avatar skidding commented on May 28, 2024

If you're calling the browser Fullscreen API – which I just found out about! – it seems like it only works inside an iframe that has the allow fullscreen on it: https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullscreen#usage_notes

Do you want to submit a PR to Cosmos to enable this functionality?

I think it's just a matter of allowing fullscreen on this iframe element:

<Iframe
data-testid="previewIframe"
ref={onIframeRef}
src={createRendererUrl(rendererUrl)}
frameBorder={0}
allow="clipboard-write *"
/>

It already has clipboard-write * so combining both would result in "clipboard-write *; fullscreen *".

Please double check that this is the syntax for combining two allow values if you make this PR.

Thanks!

from react-cosmos.

noahehall avatar noahehall commented on May 28, 2024

Basically press this button here and your fixture will break outside the Cosmos UI shell:

didnt even know that existed, but yea it works when it breaks out of the cosmo shell

im going to try your fix for the iframe

from react-cosmos.

noahehall avatar noahehall commented on May 28, 2024

@skidding you were correct, adding fullscreen *; to the iframe permission set worked perfectly in chromium and firefox developer

from react-cosmos.

skidding avatar skidding commented on May 28, 2024

@skidding you were correct, adding fullscreen *; to the iframe permission set worked perfectly in chromium and firefox developer

Cool! Will you submit a PR with that change?

from react-cosmos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.