Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New window does not have a defined DOCTYPE, so renders in quirks mode #155

Open
RobRendell opened this issue Feb 9, 2023 · 0 comments
Open

Comments

@RobRendell
Copy link

The content of the new window does not copy the parent window's DOCTYPE, and as a result the contents are being rendered in quirks mode in Chrome (and probably other browsers).

Since create-react-app inserts <!DOCTYPE html> at the top of index.html, this can lead to inconsistencies in components rendered in the new window vs. rendered in the original app. For example, tables in quirks mode do not inherit their text colour from their parent, while in strict mode they do.

If it is not possible to automatically copy the DOCTYPE of the parent window, adding an optional "doctype" prop to NewWindow we can use to set the DOCTYPE in the new window manually might be another way to deal with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant