Skip to content

Commit 4cff2e9

Browse files
author
marker dao ®
committed
fix
1 parent 0c48d3c commit 4cff2e9

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

packages/devextreme/js/__internal/ui/overlay/m_overlay.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,8 @@ class Overlay<
357357
if (this._showAnimationProcessing) {
358358
this._stopAnimation();
359359
}
360-
const isAttachedTarget = $(window.document).is(e.target) || domUtils.contains(window.document, e.target);
360+
const isAttachedTarget = $(window.document).is(e.target)
361+
|| domUtils.contains(window.document, e.target);
361362
const isInnerOverlay = $(e.target).closest(`.${INNER_OVERLAY_CLASS}`).length;
362363
const outsideClick = isAttachedTarget && !isInnerOverlay && !(this._$content?.is(e.target)
363364
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
@@ -695,7 +696,8 @@ class Overlay<
695696

696697
_stopAnimation(): void {
697698
if (this._$content) {
698-
fx.stop(this._$content.get(0), true);
699+
// @ts-expect-error ts-error
700+
fx.stop(this._$content, true);
699701
}
700702
}
701703

packages/devextreme/js/__internal/ui/speed_dial_action/m_speed_dial_item.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ class SpeedDialItem extends Overlay<SpeedDialItemProperties> {
4343

4444
_currentVisible?: boolean;
4545

46-
_$wrapper!: dxElementWrapper;
46+
_$wrapper?: dxElementWrapper | null;
4747

48-
_$content!: dxElementWrapper;
48+
_$content?: dxElementWrapper | null;
4949

5050
_inkRipple?: any;
5151

@@ -82,8 +82,10 @@ class SpeedDialItem extends Overlay<SpeedDialItemProperties> {
8282
}
8383

8484
_moveToContainer(): void {
85-
this._$wrapper.appendTo(this.$element());
86-
this._$content.appendTo(this._$wrapper);
85+
if (this._$wrapper) {
86+
this._$wrapper?.appendTo(this.$element());
87+
this._$content?.appendTo(this._$wrapper);
88+
}
8789
}
8890

8991
_render(): void {
@@ -198,8 +200,8 @@ class SpeedDialItem extends Overlay<SpeedDialItemProperties> {
198200
_updateZIndexStackPosition(): void {
199201
const { zIndex } = this.option();
200202

201-
this._$wrapper.css('zIndex', zIndex);
202-
this._$content.css('zIndex', zIndex);
203+
this._$wrapper?.css('zIndex', zIndex);
204+
this._$content?.css('zIndex', zIndex);
203205
}
204206

205207
_setClickAction(): void {

packages/devextreme/js/__internal/ui/speed_dial_action/m_speed_dial_main_item.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ class SpeedDialMainItem extends SpeedDialItem {
239239
actions[i].option('animation', this._getActionAnimation(actions[i], i, lastActionIndex));
240240
actions[i].option('position', this._getActionPosition(actions, i));
241241
// @ts-expect-error
242-
actions[i]._$wrapper.css('position', this._$wrapper.css('position'));
242+
actions[i]._$wrapper?.css('position', this._$wrapper?.css('position'));
243243
actions[i].toggle();
244244
}
245245

@@ -353,7 +353,7 @@ class SpeedDialMainItem extends SpeedDialItem {
353353

354354
_outsideClickHandler(e): void {
355355
if (this._isShadingShown) {
356-
const isShadingClick = $(e.target)[0] === this._$wrapper[0];
356+
const isShadingClick = $(e.target)[0] === this._$wrapper?.[0];
357357

358358
if (isShadingClick) {
359359
e.preventDefault();

0 commit comments

Comments
 (0)