Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LWC] TaskBoard ColumnDrag feature not working with Lightning Web Security #8707

Open
chuckn0rris opened this issue Feb 28, 2024 · 0 comments
Labels
bug Something isn't working forum Issues from forum large-account Reported by large customer OEM OEM customer premium

Comments

@chuckn0rris
Copy link

Forum post

Hello there!

I've come across this bug whilst working on other LWS related issues, and it is a weird one. The columnDrag feature is working OK with the Locker Service but is broken when Lightning Web Security is enabled. The weirdness comes from the fact that task dragging is fine!

Screen Recording 2024-02-27 at 21.05.08.gif

After some debugging I discovered that when I'm dragging a task, the target of "mousemove" event is the element which I clicked to initiate the drag. But if I grab a column, then the event.target is suddenly the topmost Lightning web component's custom element, way up the DOM tree and outside of the TaskBoard's host element! Because of this, updating the targetElement on the DragContext fails to locate droppables in the DomDataStore, which is why the target is never updated, the dragEnter is never called, and dropIndicators are never defined, which causes and exception in insertDropIndicators, which results in missing drop zones and the frozen UI.

I had a closer look at both TaskDrag and ColumnDrag features, but still could not understand why they receive such different targets from the "mousemove" event. I can see that their dragSelector config is different, but this does not explain why one works as expected and the other one is misbehaving.

I would very much appreciate it if someone pointed me in the right direction.

Thanks
Screen Recording 2024-02-27 at 21.05.08.gif

@chuckn0rris chuckn0rris added bug Something isn't working premium forum Issues from forum large-account Reported by large customer OEM OEM customer labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forum Issues from forum large-account Reported by large customer OEM OEM customer premium
Projects
None yet
Development

No branches or pull requests

1 participant