Skip to content

Commit 113c5ee

Browse files
committed
chore: downgrade floating-ui
1 parent 5d2448e commit 113c5ee

File tree

4 files changed

+12
-22
lines changed

4 files changed

+12
-22
lines changed

docs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"floating-vue": "workspace:*"
2525
},
2626
"devDependencies": {
27-
"@floating-ui/dom": "^1.3.0",
27+
"@floating-ui/dom": "^0.1.10",
2828
"@iconify-json/lucide": "^1.1.101",
2929
"@vue/eslint-config-standard": "^8.0.1",
3030
"@vue/shared": "^3.3.4",

packages/floating-vue/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"dist"
2828
],
2929
"dependencies": {
30-
"@floating-ui/dom": "^1.3.0",
30+
"@floating-ui/dom": "^0.1.10",
3131
"vue-resize": "^2.0.0-alpha.1"
3232
},
3333
"peerDependencies": {

packages/floating-vue/src/components/Popper.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
shift,
77
flip,
88
arrow,
9-
getOverflowAncestors,
9+
getScrollParents,
1010
size,
1111
} from '@floating-ui/dom'
1212
import { supportsPassive, isIOS } from '../util/env'
@@ -643,10 +643,10 @@ export default () => defineComponent({
643643
options.middleware.push(size({
644644
boundary: this.boundary,
645645
padding: this.overflowPadding,
646-
apply: ({ availableWidth, availableHeight }) => {
646+
apply: ({ width, height }) => {
647647
// Apply and re-compute
648-
this.$_innerNode.style.maxWidth = availableWidth != null ? `${availableWidth}px` : null
649-
this.$_innerNode.style.maxHeight = availableHeight != null ? `${availableHeight}px` : null
648+
this.$_innerNode.style.maxWidth = width != null ? `${width}px` : null
649+
this.$_innerNode.style.maxHeight = height != null ? `${height}px` : null
650650
},
651651
}))
652652
}
@@ -727,8 +727,8 @@ export default () => defineComponent({
727727
// Scroll
728728
if (!this.positioningDisabled) {
729729
this.$_registerEventListeners([
730-
...getOverflowAncestors(this.$_referenceNode),
731-
...getOverflowAncestors(this.$_popperNode),
730+
...getScrollParents(this.$_referenceNode),
731+
...getScrollParents(this.$_popperNode),
732732
], 'scroll', () => {
733733
this.$_computePosition()
734734
})

pnpm-lock.yaml

+4-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)