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

Some IE11 cleanups accidentally landed in 12.2.x #23736

Closed
thedavids opened this issue Oct 12, 2021 · 4 comments
Closed

Some IE11 cleanups accidentally landed in 12.2.x #23736

thedavids opened this issue Oct 12, 2021 · 4 comments
Assignees
Labels
area: material/badge area: material/chips P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful

Comments

@thedavids
Copy link

Reproduction

Steps to reproduce:

  1. Use @angular/material version 12.2.8 or later
  2. Import the MatBadgeModule in your app module
  3. Create a div with a matBadge (ex: <div [matBadge]="123">Test)
  4. Open in Internet Explorer to see the badge is not displayed and that there is an error in the console

It seems to be because of this line
const badges = this._elementRef.nativeElement.querySelectorAll(:scope > .${BADGE_CONTENT_CLASS});
located in this method _clearExistingBadges
In the badge component

Expected Behavior

We should see the badge correctly even in IE

Actual Behavior

The badge is not displayed and we have a syntax error in the IE console

Environment

  • Angular: 12.2.8
  • CDK/Material: 12.2.8
  • Browser(s): Internet Explorer
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows
@thedavids thedavids added the needs triage This issue needs to be triaged by the team label Oct 12, 2021
@thedavids thedavids changed the title matBadge is not displayed in Internet Explorer for version 12.2.8 Oct 12, 2021
@jelbourn jelbourn changed the title bug(badge): matBadge is not displayed in Internet Explorer for version 12.2.8 Oct 14, 2021
@jelbourn jelbourn changed the title Some .remove() calls accidentally landed in 12.2.x Oct 14, 2021
@jelbourn
Copy link
Member

jelbourn commented Oct 14, 2021

Updating this issue to cover all IE11 cleanups that accidentally landed in the 12.2.x branch. I've observed:

  • .remove() in badge
  • :scope in a query selector in badge

We should revert this fix on the 12.2.x branch

@jelbourn jelbourn added area: material/badge area: material/chips P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful and removed needs triage This issue needs to be triaged by the team labels Oct 14, 2021
@jelbourn jelbourn self-assigned this Oct 14, 2021
@jelbourn
Copy link
Member

@Wisdomb33r I don't have access to a device with IE11 at this moment- can you provide a pointer to the block of code where the problematic remove is referenced?

jelbourn added a commit to jelbourn/components that referenced this issue Oct 14, 2021
…ar#23562)"

This reverts commit 6b71169.

Reverts this badge fix because it relies on a querySelector API that is not supported in IE11.

Related to angular#23736
zarend pushed a commit that referenced this issue Oct 14, 2021
…" (#23754)

This reverts commit 6b71169.

Reverts this badge fix because it relies on a querySelector API that is not supported in IE11.

Related to #23736
@jelbourn
Copy link
Member

@crisbeto did some digging and determined that issue related to datepicker here comes from a missing polyfill

/**
 * IE11 requires the following for NgClass support on SVG elements
 */
// import 'classlist.js';  // Run `npm install --save classlist.js`.

Closing this since the other issue (badge) has been reverted and should be back to normal in the next patch release.

@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 Nov 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/badge area: material/chips P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful
2 participants