Page content loaded inside a 'gatsby-announcer' div
See original GitHub issueDescription
The project works perfectly fine in the development but after building and serving the project, the content of some pages is wrapped by a ‘gatsby-announcer’ div which has a ‘position:absolute;top:0;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0’ style and therefore the content basically becomes hidden. The problem is that the page loads, I can see it flicker for a split second but very quickly disappears so I’m guessing it has something to do with some gatsby script.
Steps to reproduce
Unfortunately I’m not sure how to reproduce the problem myself. For some reason, only my old pages are affected. When creating new pages, they seem to work fine.
Expected result
The content to load normally.
Actual result
The content gets wrapped by a ‘small’ div.
Environment
Run gatsby info --clipboard
in your project directory and paste the output here.
System: OS: Windows 10 10.0.18363 CPU: (8) x64 Intel® Core™ i7-6700 CPU @ 3.40GHz Binaries: Node: 12.13.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.19.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.12.0 - C:\Program Files\nodejs\npm.CMD Languages: Python: 2.7.17 Browsers: Edge: 44.18362.449.0 npmPackages: gatsby: ^2.19.28 => 2.20.23 gatsby-image: ^2.2.42 => 2.3.3 gatsby-plugin-facebook-pixel: ^1.0.3 => 1.0.3 gatsby-plugin-firebase: ^0.2.0-beta.4 => 0.2.0-beta.4 gatsby-plugin-manifest: ^2.2.42 => 2.3.4 gatsby-plugin-material-ui: ^2.1.6 => 2.1.6 gatsby-plugin-postcss: ^2.1.20 => 2.2.2 gatsby-plugin-react-svg: ^3.0.0 => 3.0.0 gatsby-plugin-sharp: ^2.4.5 => 2.5.5 gatsby-source-filesystem: ^2.1.48 => 2.2.3 gatsby-transformer-sharp: ^2.3.16 => 2.4.5
Issue Analytics
- State:
- Created 3 years ago
- Comments:23 (9 by maintainers)
Hahahah strange stuff. Seems that the problem was the order of the
<ToastComponent />
. Move it to outside, after thechildren
coming from thewrapRootElement
fixed the issue @Js-BrechtSame issue here, not able to fix. Even changing the wrapRootElement to wrapPageElement, the problem persists.