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

Commit abdd100

Browse files
joyzhongcopybara-github
authored andcommitted
fix(slider): Mark ripple event handler as passive. Fixes #6746
PiperOrigin-RevId: 350780175
1 parent 121e1f3 commit abdd100

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/mdc-slider/component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
import {MDCComponent} from '@material/base/component';
2525
import {EventType, SpecificEventListener} from '@material/base/types';
26+
import {applyPassive} from '@material/dom/events';
2627
import {matches} from '@material/dom/ponyfill';
2728
import {MDCRippleAdapter} from '@material/ripple/adapter';
2829
import {MDCRipple} from '@material/ripple/component';
@@ -323,7 +324,7 @@ export class MDCSlider extends MDCComponent<MDCSliderFoundation> {
323324
isUnbounded: () => true,
324325
registerInteractionHandler: <K extends EventType>(
325326
evtType: K, handler: SpecificEventListener<K>) => {
326-
input.addEventListener(evtType, handler);
327+
input.addEventListener(evtType, handler, applyPassive());
327328
},
328329
removeClass: (className: string) => {
329330
rippleSurface.classList.remove(className);

0 commit comments

Comments
 (0)