Skip to content

Conversation

@mariamfmr
Copy link

This pull request fixes #239048 where dragging the title of a tab in the lower panel would display incorrect text in the drag image. This issue was caused by the drag operation defaulting to the entire container, which could include unexpected text from adjacent UI elements.

Modified the drag-and-drop handler to prioritise using the .action-label element as the drag image when available, ensuring a more accurate and visually consistent drag representation. If no .action-label is found, the fallback is the entire container to maintain expected behaviour.

Added tests to verify that:

  • When an .action-label exists, it is correctly set as the drag image.
  • When no .action-label is available, the container itself is used as a fallback.
  • The drag image always maintains the correct offset (0,0) for proper positioning.

Fixes microsoft#239048 where dragging the title of a tab
in the lower panel would display incorrect text in the
drag image. Modified the drag-and-drop handler to
prioritise using the .action-label element as the drag
image when available; otherwise, it falls back to using
the entire element.

Adds tests to verify that the drag image uses the
.action-label when present and defaults to the container
element when the .action-label is absent.
@mariamfmr
Copy link
Author

@microsoft-github-policy-service agree

@mariamfmr
Copy link
Author

Hi @benibenj, just following up on this PR. Let me know if you have any feedback or if anything is needed from my side. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dragging title panel UI issue

2 participants