You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the Tree element with TreeItemCustom elements, in some situations the drag and drop functionality doesn't work:
TreeItemCustom content takes up the full width of the tree item:
Tested both in Chrome and Firefox and the bug only happens in Chrome, but I'm not sure which browser is actually following the specs here.
The problem seems to be that in Chrome, the content element is interpreted as being a sibling from shadow root of the TreeItemCustom element, instead of being a child of the
element, and therefore "blocking" interactions with the
element.
The drag and drop can still work if you drag tree item on its very start or end, but anywhere in the middle of it won't work.
Tree element is used inside another CustomElement:
In this case, the problem seems to be related to how the dragged source element is found:
Bug Description
When using the Tree element with TreeItemCustom elements, in some situations the drag and drop functionality doesn't work:
Tested both in Chrome and Firefox and the bug only happens in Chrome, but I'm not sure which browser is actually following the specs here.
The problem seems to be that in Chrome, the content element is interpreted as being a sibling from shadow root of the TreeItemCustom element, instead of being a child of the
The drag and drop can still work if you drag tree item on its very start or end, but anywhere in the middle of it won't work.
In this case, the problem seems to be related to how the dragged source element is found:
ui5-webcomponents/packages/base/src/util/dragAndDrop/DragRegistry.ts
Line 15 in 9f27a51
Using
event.target
here will return the outer CustomElement element and not the actual dragged element in its shadow dom.Affected Component
Tree, TreeItemCustom
Expected Behaviour
Drag and drop should work also for Trees with TreeItemCustom
Isolated Example
https://stackblitz.com/edit/vitejs-vite-pnft8v5r?file=src%2Fmain.ts
Steps to Reproduce
(Both cases are present in the linked repro)
Log Output, Stack Trace or Screenshots
No response
Priority
Medium
UI5 Web Components Version
2.8.0
Browser
Chrome, Firefox
Operating System
Windows
Additional Context
No response
Organization
No response
Declaration
The text was updated successfully, but these errors were encountered: