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

Firefox React DevTools breaks XML formatting #17620

Closed
henrik242 opened this issue Dec 16, 2019 · 5 comments · Fixed by #17739
Closed

Firefox React DevTools breaks XML formatting #17620

henrik242 opened this issue Dec 16, 2019 · 5 comments · Fixed by #17739

Comments

@henrik242
Copy link

Steps to reproduce:

  1. Disable all add-ons in Firefox
  2. Open an URL that points to a XML file
  3. AS EXPECTED: A pretty-printed XML is shown
  4. Enable the React DevTools Add-on
  5. Open the XML file again
  6. FAIL: Only the content inside the XML tags are shown

Using Firefox Developer Edition 72.0b6 on macOS 10.15.2

@bvaughn
Copy link
Contributor

bvaughn commented Dec 22, 2019

I am able to reproduce the behavior described using Firefox Developer Edition (72.0b1) but regular Firefox (71.0) does not exhibit the buggy behavior. I don't believe this is something that the React DevTools add-on should be able to cause, since syntax highlighting is a built-in browser feature.

There is no error in the console (or the add-on if I inspect it). Just enabling the extension is enough to immediately "break" pretty-print for XML files, e.g. https://www.w3schools.com/xml/note.xml

I believe that this may be a Firefox Developer Edition bug. It's probably not something that an extension should be able to cause. I'll open a bug on their end:
https://bugzilla.mozilla.org/show_bug.cgi?id=1605657

cc @jasonLaster

@henrik242
Copy link
Author

henrik242 commented Dec 23, 2019

Thanks! I see the same with Redux DevTools and the LastPass add-on

@bvaughn bvaughn self-assigned this Dec 28, 2019
@bvaughn
Copy link
Contributor

bvaughn commented Dec 29, 2019

It's unclear what Firefox is going to do on their end about this, but it seems like we can make this better by checking in the content script if document.contentType is "text/xml" before injecting any <script> tags.

@bvaughn
Copy link
Contributor

bvaughn commented Dec 29, 2019

This will be fixed in the next release.

@bvaughn
Copy link
Contributor

bvaughn commented Jan 3, 2020

FYI this issue should be fixed in v4.4 (released today)

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

Successfully merging a pull request may close this issue.

2 participants