Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit c4e5361

Browse files
chore: remove IE support. IE usage is <0.5%.
PiperOrigin-RevId: 688186161
1 parent 810e22d commit c4e5361

File tree

2 files changed

+1
-46
lines changed

2 files changed

+1
-46
lines changed

packages/mdc-slider/test/component.test.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -708,12 +708,7 @@ function createEventFrom(
708708
if (phase !== 'down') {
709709
type = phase === 'move' ? 'pointermove' : 'pointerup';
710710
}
711-
// PointerEvent constructor is not supported in IE. Use a MouseEvent in
712-
// IE, since PointerEvent inherits from MouseEvent.
713-
const isIe = navigator.userAgent.indexOf('MSIE') !== -1 ||
714-
navigator.userAgent.indexOf('Trident') !== -1;
715-
event = isIe ? createMouseEvent(type, {clientX}) :
716-
new PointerEvent(type, {clientX, pointerId: 1});
711+
event = new PointerEvent(type, {clientX, pointerId: 1});
717712
break;
718713
case 'mouse':
719714
type = 'mousedown';

packages/mdc-tooltip/test/component.test.ts

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ function setupTestWithMockFoundation(fixture: HTMLElement) {
3838
return {anchorElem, tooltipElem, mockFoundation, component};
3939
}
4040

41-
function isIE() {
42-
return navigator.userAgent.indexOf('MSIE') !== -1 ||
43-
navigator.userAgent.indexOf('Trident') !== -1;
44-
}
45-
4641
describe('MDCTooltip', () => {
4742
let fixture: HTMLElement;
4843
setUpMdcTestEnvironment();
@@ -383,11 +378,6 @@ describe('MDCTooltip', () => {
383378

384379
it('aria-expanded becomes false on anchor when anchor blurs and non-tooltip element is focused',
385380
() => {
386-
// FocusEvent is not supported on IE11 so this test will not be run on
387-
// it.
388-
if (isIE()) {
389-
return;
390-
}
391381
const tooltipElem = fixture.querySelector<HTMLElement>('#tt0')!;
392382
const anchorElem =
393383
fixture.querySelector<HTMLElement>('[data-tooltip-id]')!;
@@ -404,11 +394,6 @@ describe('MDCTooltip', () => {
404394

405395
it('aria-expanded remains true on anchor when anchor blurs and rich tooltip focuses',
406396
() => {
407-
// FocusEvent is not supported on IE11 so this test will not be run on
408-
// it.
409-
if (isIE()) {
410-
return;
411-
}
412397
const tooltipElem = fixture.querySelector<HTMLElement>('#tt0')!;
413398
const anchorElem =
414399
fixture.querySelector<HTMLElement>('[data-tooltip-id]')!;
@@ -425,11 +410,6 @@ describe('MDCTooltip', () => {
425410

426411
it('aria-expanded becomes false on anchor when rich tooltip focuses out and anchor does not receive focus',
427412
() => {
428-
// FocusEvent is not supported on IE11 so this test will not be run on
429-
// it.
430-
if (isIE()) {
431-
return;
432-
}
433413
const tooltipElem = fixture.querySelector<HTMLElement>('#tt0')!;
434414
const anchorElem =
435415
fixture.querySelector<HTMLElement>('[data-tooltip-id]')!;
@@ -446,11 +426,6 @@ describe('MDCTooltip', () => {
446426

447427
it('aria-expanded remains true on anchor when rich tooltip focuses out and anchor receives focus',
448428
() => {
449-
// FocusEvent is not supported on IE11 so this test will not be run on
450-
// it.
451-
if (isIE()) {
452-
return;
453-
}
454429
const tooltipElem = fixture.querySelector<HTMLElement>('#tt0')!;
455430
const anchorElem =
456431
fixture.querySelector<HTMLElement>('[data-tooltip-id]')!;
@@ -467,11 +442,6 @@ describe('MDCTooltip', () => {
467442

468443
it('aria-expanded remains true on anchor when rich tooltip focuses out and element within tooltip receives focus',
469444
() => {
470-
// FocusEvent is not supported on IE11 so this test will not be run on
471-
// it.
472-
if (isIE()) {
473-
return;
474-
}
475445
const tooltipElem = fixture.querySelector<HTMLElement>('#tt0')!;
476446
const tooltipContent =
477447
fixture.querySelector<HTMLElement>('.mdc-tooltip__content')!;
@@ -636,11 +606,6 @@ describe('MDCTooltip', () => {
636606

637607
it('aria-hidden becomes true on tooltip when anchor blurs and non-tooltip element is focused',
638608
() => {
639-
// FocusEvent is not supported on IE11 so this test will not be run on
640-
// it.
641-
if (isIE()) {
642-
return;
643-
}
644609
const tooltipElem = fixture.querySelector<HTMLElement>('#tt0')!;
645610
const anchorElem =
646611
fixture.querySelector<HTMLElement>('[aria-describedby]')!;
@@ -657,11 +622,6 @@ describe('MDCTooltip', () => {
657622

658623
it('aria-hidden remains false on tooltip when anchor blurs and rich tooltip focuses',
659624
() => {
660-
// FocusEvent is not supported on IE11 so this test will not be run on
661-
// it.
662-
if (isIE()) {
663-
return;
664-
}
665625
const tooltipElem = fixture.querySelector<HTMLElement>('#tt0')!;
666626
const anchorElem =
667627
fixture.querySelector<HTMLElement>('[aria-describedby]')!;

0 commit comments

Comments
 (0)