mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +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)
|
||||
.find('span')
|
||||
.contains('count')
|
||||
.trigger('mousedown', { force: true });
|
||||
.trigger('mousedown', { force: true, button: 0, buttons: 1 });
|
||||
ndv.actions.mapToParameter('value');
|
||||
|
||||
ndv.getters.inlineExpressionEditorInput().should('have.text', '{{ $json.input[0].count }}');
|
||||
|
||||
@@ -38,7 +38,7 @@ const draggableStyle = computed<StyleValue>(() => ({
|
||||
}));
|
||||
|
||||
const onDragStart = (event: MouseEvent) => {
|
||||
if (props.disabled) {
|
||||
if (props.disabled || event.buttons !== 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -526,8 +526,8 @@ describe('VirtualSchema.vue', () => {
|
||||
function dragDropPill(pill: HTMLElement) {
|
||||
const ndvStore = useNDVStore();
|
||||
const reset = vi.spyOn(ndvStore, 'resetMappingTelemetry');
|
||||
fireEvent(pill, new MouseEvent('mousedown', { bubbles: true }));
|
||||
fireEvent(window, new MouseEvent('mousemove', { bubbles: true }));
|
||||
fireEvent(pill, new MouseEvent('mousedown', { bubbles: true, button: 0, buttons: 1 }));
|
||||
fireEvent(window, new MouseEvent('mousemove', { bubbles: true, button: 0, buttons: 1 }));
|
||||
expect(reset).toHaveBeenCalled();
|
||||
|
||||
vi.useRealTimers();
|
||||
|
||||
Reference in New Issue
Block a user