mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-19 22:09:37 +00:00
[backport cloud/1.42] fix: prevent canvas zoom when scrolling image history dropdown (#10550) (#10896)
Backport of #10550 to cloud/1.42. Clean cherry-pick. Co-authored-by: Kelly Yang <124ykl@gmail.com> Co-authored-by: Terry Jia <terryjia88@gmail.com> Co-authored-by: Alexander Brown <drjkl@comfy.org>
This commit is contained in:
@@ -110,4 +110,19 @@ describe('FormDropdownMenu', () => {
|
||||
const virtualGrid = wrapper.findComponent({ name: 'VirtualGrid' })
|
||||
expect(virtualGrid.props('maxColumns')).toBe(1)
|
||||
})
|
||||
|
||||
it('has data-capture-wheel="true" on the root element', () => {
|
||||
const wrapper = mount(FormDropdownMenu, {
|
||||
props: defaultProps,
|
||||
global: {
|
||||
stubs: {
|
||||
FormDropdownMenuFilter: true,
|
||||
FormDropdownMenuActions: true,
|
||||
VirtualGrid: true
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
expect(wrapper.attributes('data-capture-wheel')).toBe('true')
|
||||
})
|
||||
})
|
||||
|
||||
@@ -98,6 +98,7 @@ const virtualItems = computed<VirtualDropdownItem[]>(() =>
|
||||
<template>
|
||||
<div
|
||||
class="flex h-[640px] w-103 flex-col rounded-lg bg-component-node-background pt-4 outline -outline-offset-1 outline-node-component-border"
|
||||
data-capture-wheel="true"
|
||||
>
|
||||
<FormDropdownMenuFilter
|
||||
v-if="filterOptions.length > 0"
|
||||
|
||||
@@ -101,6 +101,7 @@ function toggleBaseModelSelection(item: FilterOption) {
|
||||
<div class="text-secondary flex gap-2 px-4">
|
||||
<FormSearchInput
|
||||
v-model="searchQuery"
|
||||
autofocus
|
||||
:class="
|
||||
cn(
|
||||
actionButtonStyle,
|
||||
|
||||
Reference in New Issue
Block a user