Kanban click behavior

Hi there:

I’m facing a pretty weird issue on Kanban board, maybe others have managed this before.

Sometimes clickling on card title doesn’t work as expected (opening form, for Opportunity in my case, but doesn’t matter) … Instead I see a refresh of kanban board. Inspecting browser events: Event mousedown is triggered, but not click event. After clicking 4 o 5 times (or more) form get opened.

kanban

Tried to force click event on every mousedown with e.target.click(); on kanban_board.bundle.js, and seems it works better … so this could be a fix. But maybe there is cleaner way or better explanation. :slight_smile:

function bind_clickdrag() {
			let isDown = false;
			let startX;
			let scrollLeft;
			let draggable = self.$kanban_board[0];

			draggable.addEventListener("mousedown", (e) => {
				// don't trigger scroll if one of the ancestors of the
				// clicked element matches any of these selectors
				e.target.click();
				let ignoreEl = [
					".kanban-column .kanban-column-header",
					".kanban-column .add-card",
					".kanban-column .kanban-card.new-card-area",
					".kanban-card-wrapper",
				];
				if (ignoreEl.some((el) => e.target.closest(el))) return;

				isDown = true;
				draggable.classList.add("clickdrag-active");
				startX = e.pageX - draggable.offsetLeft;
				scrollLeft = draggable.scrollLeft;
			});
			draggable.addEventListener("mouseleave", () => {
				isDown = false;
				draggable.classList.remove("clickdrag-active");
			});
			draggable.addEventListener("mouseup", () => {
				isDown = false;
				draggable.classList.remove("clickdrag-active");
			});
			draggable.addEventListener("mousemove", (e) => {
				if (!isDown) return;
				e.preventDefault();
				const x = e.pageX - draggable.offsetLeft;
				const walk = x - startX;
				draggable.scrollLeft = scrollLeft - walk;
			});
		}

For reference:

Thanks.

Anybody else can reproduce this?