Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

327
Visualizações
Create-React-App creates this <iframe> that prevents me from clicking or editing directly the app unless I delete it in the elements browswer editor

I recently did a global install of create-react-app and am having an issue where sometimes, when I'm working on a project, instead of editing directly what I have rendered in , it creates this container around the entire app.

Upon further inspection it looks like it is an which is rendered in the browswer as this:

<iframe style="position: fixed; top: 0px; left: 0px; width: 100%; height: 100%; border: none; z-index: 2147483647;"></iframe>

I have screenshotted below what this ends up looking like in my app (the iframe is the orange text on the right), but it's super annoying and I've deleted the css props and cannot imagine what is causing this container around my app.

Has anyone else come across this? I have to delete this iframe to edit the elements directly from the browser but can't think why this is rendering each time I load the app in the browser.

enter image description here

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

So after MUCH research and testing, I finally figured this out and I hope it can save anyone in the same situation I was in 😊

I have found two solutions that can solve this, one with a .env file that sometimes works, and the other solution is with css that I want to say always will solve this issue.

Fix #1: .env solution

In the root folder level (the same level as the .gitignore, package.json, README.md, yarn.lock, /src), create a .env file and include the following in it:

FAST_REFRESH=false

This sometimes works, but if this doesn't work after awhile, proceed to the second solution below.

Fix #2: App.css fix to disable pointer-events for iframe

This solution is what has saved me a bunch. Basically what this solution fixes is the wrapping iframe around the html files that exist in an app in the React.js template.

In your global styles file, add the following property to an iframe element: pointer-events: none. I then import this css file into my JSX page so that it will remove this iframe wrapper around the page. This will disable the iframe overlay and allow you to effectively click anywhere within the window frame.

iframe {
  pointer-events: none;
}

Hopefully one of these solutions saves you hours of research and time 😊

over 4 years ago · Santiago Trujillo Relatório

0

I haven't tried it, but the accepted answer looks like it will just disable fast refresh all together which is not ideal so..

Take a look at this github issue response

https://github.com/facebook/create-react-app/issues/11880#issuecomment-1005409614

Specifically I only needed

// package.json

"resolutions": { "react-error-overlay": "6.0.9" },

Make sure to run yarn or npm install after updating

over 4 years ago · Santiago Trujillo Relatório

0

I had this problem because I had lint errors in my code, and after I fixed all the lint errors, the iframe disappeared see the detail here

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda