diff --git a/src/components/modal/modal.vue b/src/components/modal/modal.vue index 3c62366d..e07eae89 100644 --- a/src/components/modal/modal.vue +++ b/src/components/modal/modal.vue @@ -199,8 +199,9 @@ let style = {}; if (this.draggable) { + let customTop = this.styles.top ? parseFloat(this.styles.top) : 0 if (this.dragData.x !== null) style.left = `${this.dragData.x}px`; - if (this.dragData.y !== null) style.top = `${this.dragData.y}px`; + if (this.dragData.y !== null) style.top = `${this.dragData.y - customTop}px`; const width = parseInt(this.width); const styleWidth = { width: width <= 100 ? `${width}%` : `${width}px`