mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(editor): Only drag folders when holding mouse 1 button (#16809)
This commit is contained in:
@@ -76,7 +76,7 @@ describe('Data mapping', () => {
|
|||||||
.inputTbodyCell(1, 0)
|
.inputTbodyCell(1, 0)
|
||||||
.find('span')
|
.find('span')
|
||||||
.contains('count')
|
.contains('count')
|
||||||
.trigger('mousedown', { force: true });
|
.trigger('mousedown', { force: true, button: 0, buttons: 1 });
|
||||||
ndv.actions.mapToParameter('value');
|
ndv.actions.mapToParameter('value');
|
||||||
|
|
||||||
ndv.getters.inlineExpressionEditorInput().should('have.text', '{{ $json.input[0].count }}');
|
ndv.getters.inlineExpressionEditorInput().should('have.text', '{{ $json.input[0].count }}');
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ const draggableStyle = computed<StyleValue>(() => ({
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
const onDragStart = (event: MouseEvent) => {
|
const onDragStart = (event: MouseEvent) => {
|
||||||
if (props.disabled) {
|
if (props.disabled || event.buttons !== 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -526,8 +526,8 @@ describe('VirtualSchema.vue', () => {
|
|||||||
function dragDropPill(pill: HTMLElement) {
|
function dragDropPill(pill: HTMLElement) {
|
||||||
const ndvStore = useNDVStore();
|
const ndvStore = useNDVStore();
|
||||||
const reset = vi.spyOn(ndvStore, 'resetMappingTelemetry');
|
const reset = vi.spyOn(ndvStore, 'resetMappingTelemetry');
|
||||||
fireEvent(pill, new MouseEvent('mousedown', { bubbles: true }));
|
fireEvent(pill, new MouseEvent('mousedown', { bubbles: true, button: 0, buttons: 1 }));
|
||||||
fireEvent(window, new MouseEvent('mousemove', { bubbles: true }));
|
fireEvent(window, new MouseEvent('mousemove', { bubbles: true, button: 0, buttons: 1 }));
|
||||||
expect(reset).toHaveBeenCalled();
|
expect(reset).toHaveBeenCalled();
|
||||||
|
|
||||||
vi.useRealTimers();
|
vi.useRealTimers();
|
||||||
|
|||||||
Reference in New Issue
Block a user