mirror of
https://github.com/element-plus/element-plus.git
synced 2025-01-18 10:59:10 +08:00
test: fix scrollIntoView (#5960)
This commit is contained in:
parent
39cb432cd9
commit
590538cd38
@ -278,7 +278,7 @@ export default defineComponent({
|
||||
const activeNode =
|
||||
menuElement.querySelector('.el-cascader-node.is-active') ||
|
||||
menuElement.querySelector('.el-cascader-node.in-active-path')
|
||||
container?.scrollIntoView(activeNode)
|
||||
container?.scrollIntoView?.(activeNode)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ export default defineComponent({
|
||||
const scrollToField = (prop: string) => {
|
||||
fields.forEach((item) => {
|
||||
if (item.prop === prop) {
|
||||
item.$el.scrollIntoView()
|
||||
item.$el.scrollIntoView?.()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -659,7 +659,7 @@ export const useSelect = (props, states: States, ctx) => {
|
||||
'.el-select-dropdown__wrap'
|
||||
)
|
||||
if (menu) {
|
||||
menu.scrollIntoView(target)
|
||||
menu.scrollIntoView?.(target)
|
||||
}
|
||||
}
|
||||
scrollbar.value?.handleScroll()
|
||||
|
Loading…
Reference in New Issue
Block a user