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

<style> tags being treated as empty <link> tags #485

Closed
Zeng-Jun-Wei opened this issue Apr 9, 2022 · 6 comments · Fixed by #486
Closed

<style> tags being treated as empty <link> tags #485

Zeng-Jun-Wei opened this issue Apr 9, 2022 · 6 comments · Fixed by #486
Labels

Comments

@Zeng-Jun-Wei
Copy link

Prompt this question as I print:
image
Not displayed correctly:
image

codesandbox: https://codesandbox.io/s/damp-sky-xexium?file=/src/ComponentToPrint.tsx

@MatthewHerbst MatthewHerbst changed the title In addition to being invalid HTML, this can cause problems in many browsers, and so the <link> was not loaded. <style> tags being treated as empty <link> tags Apr 9, 2022
@MatthewHerbst
Copy link
Owner

It seems we are being too strict in our checking of <style> tags. Currently we check to see if the tagName === 'STYLE' but it seems it can also be lower-case 'style' sometimes. I'll make the check more resilient and have a fix shortly.

@MatthewHerbst
Copy link
Owner

Ok, v2.14.6 fixes the warnings, but it still does not print the selection. Will keep looking

@MatthewHerbst
Copy link
Owner

It's strange, because in the official example codesandbox radio buttons print without problem, so it makes me think the issue is something with survey-react, not sure yet though

@Zeng-Jun-Wei
Copy link
Author

It's strange, because in the official example codesandbox radio buttons print without problem, so it makes me think the issue is something with survey-react, not sure yet though

survey-react radio is a SVG img. and When selected, modify SVG fill color.

@MatthewHerbst
Copy link
Owner

Yeah, not sure why that isn't being picked up, we already have a test for making sure we do SVGs properly and there is no problem there. Will look into it tonight

@Zeng-Jun-Wei
Copy link
Author

Yeah, not sure why that isn't being picked up, we already have a test for making sure we do SVGs properly and there is no problem there. Will look into it tonight

ok, thinks.

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

Successfully merging a pull request may close this issue.

2 participants