diff --git a/src/components/NumericInput/index.ts b/src/components/NumericInput/index.ts index 9d3e1a36..fc183546 100644 --- a/src/components/NumericInput/index.ts +++ b/src/components/NumericInput/index.ts @@ -213,8 +213,20 @@ class NumericInput extends InputElement { super._onInputKeyDown(evt); } + protected _getPointerLockElementByShadowRoot(pointerLockElement: any): boolean { + const shadowRoot = pointerLockElement.shadowRoot; + if (shadowRoot) { + const pointerLockElement = shadowRoot.pointerLockElement; + return this._getPointerLockElementByShadowRoot(pointerLockElement); + } + return pointerLockElement === this._sliderControl.dom; + } + protected _isScrolling() { if (!this._sliderControl) return false; + if (document.pointerLockElement && document.pointerLockElement.shadowRoot) { + return this._getPointerLockElementByShadowRoot(document.pointerLockElement); + } return document.pointerLockElement === this._sliderControl.dom; }