diff --git a/packages/floating-vue/package.json b/packages/floating-vue/package.json index ea7117d9..191153ca 100644 --- a/packages/floating-vue/package.json +++ b/packages/floating-vue/package.json @@ -15,8 +15,8 @@ "module": "dist/floating-vue.es.js", "types": "dist/index.d.ts", "dependencies": { - "@floating-ui/dom": "^0.1.10", - "vue-resize": "^1.0.0" + "@floating-ui/dom": "^1.1.1", + "vue-resize": "^1.0.1" }, "peerDependencies": { "vue": "^2.6.10" diff --git a/packages/floating-vue/src/components/Popper.ts b/packages/floating-vue/src/components/Popper.ts index 43952961..ebeaa81c 100644 --- a/packages/floating-vue/src/components/Popper.ts +++ b/packages/floating-vue/src/components/Popper.ts @@ -5,7 +5,7 @@ import { shift, flip, arrow, - getScrollParents, + getOverflowAncestors, size, } from '@floating-ui/dom' import { supportsPassive, isIOS } from '../util/env' @@ -624,10 +624,10 @@ export default () => ({ options.middleware.push(size({ boundary: this.boundary, padding: this.overflowPadding, - apply: ({ width, height }) => { + apply: ({ availableWidth, availableHeight }) => { // Apply and re-compute - this.$_innerNode.style.maxWidth = width != null ? `${width}px` : null - this.$_innerNode.style.maxHeight = height != null ? `${height}px` : null + this.$_innerNode.style.maxWidth = availableWidth != null ? `${availableWidth}px` : null + this.$_innerNode.style.maxHeight = availableHeight != null ? `${availableHeight}px` : null }, })) } @@ -707,8 +707,8 @@ export default () => ({ // Scroll if (!this.positioningDisabled) { this.$_registerEventListeners([ - ...getScrollParents(this.$_referenceNode), - ...getScrollParents(this.$_popperNode), + ...getOverflowAncestors(this.$_referenceNode), + ...getOverflowAncestors(this.$_popperNode), ], 'scroll', () => { this.$_computePosition() }) diff --git a/yarn.lock b/yarn.lock index 2d6239d3..b62ca858 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1041,17 +1041,17 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" -"@floating-ui/core@^0.3.0": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-0.3.1.tgz#3dde0ad0724d4b730567c92f49f0950910e18871" - integrity sha512-ensKY7Ub59u16qsVIFEo2hwTCqZ/r9oZZFh51ivcLGHfUwTn8l1Xzng8RJUe91H/UP8PeqeBronAGx0qmzwk2g== +"@floating-ui/core@^1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.3.1.tgz#4d795b649cc3b1cbb760d191c80dcb4353c9a366" + integrity sha512-Bu+AMaXNjrpjh41znzHqaz3r2Nr8hHuHZT6V2LBKMhyMl0FgKA62PNYbqnfgmzOhoWZj70Zecisbo4H1rotP5g== -"@floating-ui/dom@^0.1.10": - version "0.1.10" - resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-0.1.10.tgz#ce304136a52c71ef157826d2ebf52d68fa2deed5" - integrity sha512-4kAVoogvQm2N0XE0G6APQJuCNuErjOfPW8Ux7DFxh8+AfugWflwVJ5LDlHOwrwut7z/30NUvdtHzQ3zSip4EzQ== +"@floating-ui/dom@^1.1.1": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.4.2.tgz#eb3a37f7506c4f95ef735967dc3496b5012e11cb" + integrity sha512-VKmvHVatWnewmGGy+7Mdy4cTJX71Pli6v/Wjb5RQBuq5wjUYx+Ef+kRThi8qggZqDgD8CogCpqhRoVp3+yQk+g== dependencies: - "@floating-ui/core" "^0.3.0" + "@floating-ui/core" "^1.3.1" "@gar/promisify@^1.0.1": version "1.1.3" @@ -14010,7 +14010,7 @@ vue-loader@^15.7.1: vue-hot-reload-api "^2.3.0" vue-style-loader "^4.1.0" -vue-resize@^1.0.0: +vue-resize@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/vue-resize/-/vue-resize-1.0.1.tgz#c120bed4e09938771d622614f57dbcf58a5147ee" integrity sha512-z5M7lJs0QluJnaoMFTIeGx6dIkYxOwHThlZDeQnWZBizKblb99GSejPnK37ZbNE/rVwDcYcHY+Io+AxdpY952w==