Skip to content

Commit cd2687b

Browse files
committed
fixup! fix(material-experimental/mdc-slider): sync ui on mouseenter
1 parent 0bd666b commit cd2687b

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/material-experimental/mdc-slider/slider.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1930,11 +1930,11 @@ function getCoordsForValue(slider: MatSlider, value: number): Point {
19301930
/** Dispatch a pointerdown or pointerup event if supported, otherwise dispatch the touch event. */
19311931
function dispatchPointerOrTouchEvent(
19321932
node: Node, type: PointerEventType, x: number, y: number, isIOS: boolean) {
1933-
if (isIOS) {
1934-
dispatchTouchEvent(node, pointerEventTypeToTouchEventType(type), x, y, x, y);
1935-
} else {
1936-
dispatchPointerEvent(node, type, x, y);
1937-
}
1933+
if (isIOS) {
1934+
dispatchTouchEvent(node, pointerEventTypeToTouchEventType(type), x, y, x, y);
1935+
} else {
1936+
dispatchPointerEvent(node, type, x, y);
1937+
}
19381938
}
19391939

19401940
/** Returns the touch event equivalent of the given pointer event. */

src/material-experimental/mdc-slider/slider.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,9 @@ export class MatSlider extends _MatSliderMixinBase
627627
_endValueIndicatorText: string;
628628

629629
/** Whether the browser supports pointer events. */
630-
private _SUPPORTS_POINTER_EVENTS = typeof PointerEvent !== 'undefined' && !!PointerEvent;
630+
private _SUPPORTS_POINTER_EVENTS = typeof PointerEvent !== 'undefined'
631+
&& !!PointerEvent
632+
&& !this._platform.IOS; // We exclude iOS to mirror the MDC Foundation
631633

632634
/** Subscription to changes to the directionality (LTR / RTL) context for the application. */
633635
private _dirChangeSubscription: Subscription;

0 commit comments

Comments
 (0)