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

Dialog: Draggable fails with Tab View Present #4330

Closed
caputech opened this issue Aug 24, 2023 · 4 comments
Closed

Dialog: Draggable fails with Tab View Present #4330

caputech opened this issue Aug 24, 2023 · 4 comments
Assignees
Labels
Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted

Comments

@caputech
Copy link

          This is not really the issue I was reporting.  Draggable is failing if their is a Tab View in the Dialog.  It seems to have started in 3.30.0.  A reproducer is here.  https://stackblitz.com/edit/o7cqoc-gmw8jq?file=package.json

Originally posted by @caputech in #4298 (comment)

@Dmytro-Lukashenko
Copy link
Contributor

Hi @caputech. You're right, there is really issue with dragging Dialog when TabView is inside it, but not only TabView. I found the same problem with other components. Today I'll investigate the reason for this bug and try to fix it. Happy codding!

@Dmytro-Lukashenko
Copy link
Contributor

Dmytro-Lukashenko commented Aug 25, 2023

You can try adding a title to the header and with the title you can drag the dialog only by clicking on the title text or close button.
Implementation with header title
But it doesn't solve the problem.

I've figured out the reason for the bug. Inside the Dialog component, we have an initDrag method. Inside this method, we have the condition for checking if the element or its parent has 'data-pc-section' attribute with "headeraction" value. If the element meets this condition initDrag stops working and Dialog doesn't drag. We can solve this problem by deleting this condition from the initDrag method. But it could cause unexpected behavior in the Dialog.

@bahadirsofuoglu could you please check this solution cause you added this condition in commit. Won't it cause the unexpected behavior of the Dialog component?

I've created a pull request #4332 to fix this bug.

@caputech
Copy link
Author

Thanks. I did notice that a header could be dragged. However, we use the header slot instead of the prop. And using that, it does not allow dragging via the header.

@bahadirsofuoglu bahadirsofuoglu self-assigned this Aug 29, 2023
@bahadirsofuoglu bahadirsofuoglu added the Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted label Aug 29, 2023
@bahadirsofuoglu
Copy link
Contributor

Duplicate #4182

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants