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

fix(devtools): prevent devTools to load when not text/html document #48021

Closed
wants to merge 1 commit into from

Conversation

JeanMeche
Copy link
Member

@JeanMeche JeanMeche commented Nov 10, 2022

The Angular DevTools extension breaks the XML formatting on Firefox.
This happens because a script tag is injected into the DOM even if it's a XML Document.

React DevTools had the same issue. They fixed it by checking the content-type before injecting the script.

Fixes #48017

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Nov 10, 2022
@pullapprove pullapprove bot requested a review from twerske November 10, 2022 13:28
@JeanMeche JeanMeche force-pushed the feature/fix-48017 branch 3 times, most recently from a6d123b to b4b7b4a Compare November 10, 2022 13:40
@angular-robot angular-robot bot removed the detected: feature PR contains a feature commit label Nov 10, 2022
On Firefox, Angular DevTools was breaking the XML display because of the script injected
Based on contentType, we won't inject that script anymore

Fixes angular#48017
@ngbot ngbot bot added this to the Backlog milestone Nov 10, 2022
@mgechev mgechev requested review from AleksanderBodurri and removed request for twerske and jessicajaniuk November 10, 2022 19:23
Copy link
Member

@AleksanderBodurri AleksanderBodurri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Thank you @JeanMeche

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Nov 15, 2022
@dylhunn
Copy link
Contributor

dylhunn commented Nov 17, 2022

This PR was merged into the repository by commit f8f8928.

@dylhunn dylhunn closed this in f8f8928 Nov 17, 2022
dylhunn pushed a commit that referenced this pull request Nov 17, 2022
…48021)

On Firefox, Angular DevTools was breaking the XML display because of the script injected
Based on contentType, we won't inject that script anymore

Fixes #48017

PR Close #48021
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 18, 2022
@JeanMeche JeanMeche deleted the feature/fix-48017 branch January 4, 2023 22:58
trekladyone pushed a commit to trekladyone/angular that referenced this pull request Feb 1, 2023
…ngular#48021)

On Firefox, Angular DevTools was breaking the XML display because of the script injected
Based on contentType, we won't inject that script anymore

Fixes angular#48017

PR Close angular#48021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: devtools target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Firefox XML formatting is broken
6 participants