mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
fix(editor): Prevent browser zoom when scrolling inside sticky edit mode (#8116)
## Summary Fixes a bug where zooming inside a sticky edit mode would trigger browser zoom. Instead, triggers regular canvas zoom. ## Related tickets and issues Fixes ADO-1581 ## Review / Merge checklist - [ ] PR title and summary are descriptive. **Remember, the title automatically goes into the changelog. Use `(no-changelog)` otherwise.** ([conventions](https://github.com/n8n-io/n8n/blob/master/.github/pull_request_title_conventions.md)) - [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up ticket created. - [ ] Tests included. > A bug is not considered fixed, unless a test is added to prevent it from happening again. > A feature is not complete without tests.
This commit is contained in:
parent
c6dd935895
commit
e928210ccd
|
@ -36,7 +36,6 @@
|
|||
@mouseup.stop
|
||||
@keydown.esc="onInputBlur"
|
||||
@keydown.stop
|
||||
@wheel.stop
|
||||
:class="{ 'full-height': !shouldShowFooter, 'sticky-textarea': true }"
|
||||
>
|
||||
<n8n-input
|
||||
|
@ -45,6 +44,7 @@
|
|||
:rows="5"
|
||||
@blur="onInputBlur"
|
||||
@update:modelValue="onUpdateModelValue"
|
||||
@wheel="onInputScroll"
|
||||
ref="input"
|
||||
/>
|
||||
</div>
|
||||
|
@ -180,6 +180,12 @@ export default defineComponent({
|
|||
this.isResizing = true;
|
||||
this.$emit('resizestart');
|
||||
},
|
||||
onInputScroll(event: WheelEvent) {
|
||||
// Pass through zoom events but hold regular scrolling
|
||||
if (!event.ctrlKey && !event.metaKey) {
|
||||
event.stopPropagation();
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
editMode(newMode, prevMode) {
|
||||
|
|
Loading…
Reference in a new issue