mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
refactor(core): replace document listeners with pointer capture in slider (#762)
This commit is contained in:
@@ -78,11 +78,8 @@ export class SliderElement extends MediaElement {
|
||||
});
|
||||
|
||||
applyElementProps(this, this.#slider.rootProps, { signal });
|
||||
applyStyles(this, this.#slider.rootStyle);
|
||||
this.#slider.input.subscribe(() => this.requestUpdate(), { signal });
|
||||
|
||||
// Prevent default touch gestures and text selection during interaction.
|
||||
this.style.touchAction = 'none';
|
||||
this.style.userSelect = 'none';
|
||||
}
|
||||
|
||||
override disconnectedCallback(): void {
|
||||
|
||||
@@ -83,12 +83,9 @@ export class TimeSliderElement extends MediaElement {
|
||||
});
|
||||
|
||||
applyElementProps(this, this.#slider.rootProps, { signal });
|
||||
applyStyles(this, this.#slider.rootStyle);
|
||||
this.#slider.input.subscribe(() => this.requestUpdate(), { signal });
|
||||
|
||||
// Prevent default touch gestures and text selection during interaction.
|
||||
this.style.touchAction = 'none';
|
||||
this.style.userSelect = 'none';
|
||||
|
||||
if (__DEV__ && !this.#timeState.value) {
|
||||
logMissingFeature(this.localName, this.#timeState.displayName!);
|
||||
}
|
||||
|
||||
@@ -79,12 +79,9 @@ export class VolumeSliderElement extends MediaElement {
|
||||
});
|
||||
|
||||
applyElementProps(this, this.#slider.rootProps, { signal });
|
||||
applyStyles(this, this.#slider.rootStyle);
|
||||
this.#slider.input.subscribe(() => this.requestUpdate(), { signal });
|
||||
|
||||
// Prevent default touch gestures and text selection during interaction.
|
||||
this.style.touchAction = 'none';
|
||||
this.style.userSelect = 'none';
|
||||
|
||||
if (__DEV__ && !this.#volumeState.value) {
|
||||
logMissingFeature(this.localName, this.#volumeState.displayName!);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user