fix: failed to execute 'observe' on 'IntersectionObserver' (#3122)
This commit is contained in:
@@ -115,7 +115,9 @@
|
|||||||
}"
|
}"
|
||||||
:style="[
|
:style="[
|
||||||
`--thumb-width: ${scrollThumb.width}px`,
|
`--thumb-width: ${scrollThumb.width}px`,
|
||||||
`width: calc(100% - ${hasActions ? mdAndLarger ? '19rem' : '7rem' : '3rem'})`,
|
`width: calc(100% - ${
|
||||||
|
hasActions ? (mdAndLarger ? '19rem' : '7rem') : '3rem'
|
||||||
|
})`,
|
||||||
]"
|
]"
|
||||||
id="myRange"
|
id="myRange"
|
||||||
/>
|
/>
|
||||||
@@ -144,7 +146,11 @@ import {
|
|||||||
nextTick,
|
nextTick,
|
||||||
useSlots,
|
useSlots,
|
||||||
} from "vue"
|
} from "vue"
|
||||||
import { breakpointsTailwind, useBreakpoints, useElementSize } from "@vueuse/core"
|
import {
|
||||||
|
breakpointsTailwind,
|
||||||
|
useBreakpoints,
|
||||||
|
useElementSize,
|
||||||
|
} from "@vueuse/core"
|
||||||
import type { Slot } from "vue"
|
import type { Slot } from "vue"
|
||||||
import draggable from "vuedraggable-es"
|
import draggable from "vuedraggable-es"
|
||||||
import { HoppUIPluginOptions, HOPP_UI_OPTIONS } from "./../../index"
|
import { HoppUIPluginOptions, HOPP_UI_OPTIONS } from "./../../index"
|
||||||
@@ -350,8 +356,8 @@ watch(
|
|||||||
rootMargin: "0px",
|
rootMargin: "0px",
|
||||||
threshold: 1.0,
|
threshold: 1.0,
|
||||||
})
|
})
|
||||||
observer.observe(element!)
|
|
||||||
|
|
||||||
|
if (element) observer.observe(element)
|
||||||
element?.scrollIntoView({ behavior: "smooth", inline: "center" })
|
element?.scrollIntoView({ behavior: "smooth", inline: "center" })
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user