primeng icon indicating copy to clipboard operation
primeng copied to clipboard

p-dialog as modal popup disappears when dragging after the window it is in is scrolled downward

Open GottaCodeNow opened this issue 5 years ago • 7 comments

I'm submitting a ... (check one with "x")

[x] bug report 

Plunkr Case (Bug Reports) Please demonstrate your case at stackblitz by using the issue template below. Issues without a test case have much less possibility to be reviewd in detail and assisted.

https://stackblitz.com/edit/github-ygerqp?file=src%2Fapp%2Ftest-dialog%2Ftest-dialog.component.ts

Current behavior p-dialog as modal popup. If the window it is in is scrolled down a bit first and then the popup is made visible, dragging it will make it disappear downwards out of view, as the math that sets the "top" position of the dialog box is apparently incorrect. This is with "keepInViewport" set to false. If it's set to true (the default), the popup will be visible at the bottom of the viewable window, but can only be dragged left or right, but no longer vertically.

Expected behavior popup stays with the mouse when dragged and doesn't disappear out of view

Minimal reproduction of the problem with instructions

Can't access plnkr behind our corporate firewall, but is easily reproduced in the stackblitz example listed above

What is the motivation / use case for changing the behavior?

It just needs to be fixed. We have been using the p-dialog for years in an internal application and now, after upgrading, it is unusable for us.

Please tell us about your environment:

  • Angular version: 5.X Angular 11

  • PrimeNG version: 5.X PrimeNG 11.1

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] Same behavior in Chrome, Edge, Firefox.

GottaCodeNow avatar Jan 15 '21 23:01 GottaCodeNow

Your patch work perfect.

astranCZ avatar Feb 03 '21 11:02 astranCZ

Has any solution been found for this problem?

ayselmehmetzade avatar Feb 26 '21 11:02 ayselmehmetzade

You can reproduce the bug easily on the sampleside: https://primefaces.org/primeng/showcase/#/dialog Scroll a bit down, open the first Basic dialog and try to move it. It instantly docks to the lower border.

Please fix it soon. When GottyCodeNows fix is working, it's only one line to change!

CC84 avatar Mar 17 '21 19:03 CC84

Can GottaCodeNow fix be added in the next version? thanks!

cicciogeppo88 avatar Mar 22 '21 15:03 cicciogeppo88

I have the same issue, please fix this soon

KevinHtzl avatar May 11 '21 12:05 KevinHtzl

Please fix this! I am using the latest angular and primeng version (12.X). As stated above, even on the official demo-site the issue exists.

D-Biela avatar Jul 08 '21 12:07 D-Biela

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you reopen the issue so we can include it in our roadmap? Please don't forget to add your feedback as a comment after reopening the issue. These will be taken into account by us and will contribute to the development of this feature. Thanks a lot for your understanding!

Best Regards,

mertsincan avatar Nov 09 '22 20:11 mertsincan