primeng icon indicating copy to clipboard operation
primeng copied to clipboard

p-autocomplete in a p-dialog with appendTo="body" displays choices under the dialog

Open JordanDurieux opened this issue 9 years ago • 2 comments

There is no guarantee in receiving a response in GitHub Issue Tracker, If you'd like to secure our response, you may consider PrimeNG PRO Support where support is provided within 4 business hours

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

[ x ] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports) Please fork the plunkr below and create a case demonstrating your bug report. Issues without a plunkr have much less possibility to be reviewed.

http://plnkr.co/edit/6q5v84DWolH6DeAdi70w?p=preview

Current behavior When an autocomplete is used in a dialog with appendTo="body" :

  • the first click to the dropdown button displays the choices available correctly
  • the second click to the dropdown button does not hide the choices displayed but it displays the choices under the popup (actually the z-index of the popup is increased but not the z-index of the choices div).

The z-index problem occurs also on p-dropdown but as the second click hide the choices, it is barely noticeable (but looking closely, it is the same problem). (To see it clearly, on the second click just keep the click button pressed, choices go under the dialog, and release to finally hide the choices) On the p-autocomplete you have to set focus elsewhere (to hide the choices) then click back on the dropdown button to display the choices again.

Expected behavior Ideally the second click on the dropdown button should hide the choices like p-dropdown. But the most important is that a click on the autocomplete box (input or dropdown button) should have no effect on the z-index ratio between the p-dialog and choices div.

Minimal reproduction of the problem with instructions A p-dialog including a p-autocomplete with appendTo="body" See plunkr => http://plnkr.co/edit/P3EVIjRZT1jJ43ndepAn?p=preview

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

Please tell us about your environment:

  • Angular version: 4.3.6
  • PrimeNG version: 4.3.0
  • 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 ]
  • Language: [all | TypeScript X.X | ES6/7 | ES5]

  • Node (for AoT issues): node --version =

JordanDurieux avatar Nov 24 '17 10:11 JordanDurieux

I couldn't replicate it, please try with latest PrimeNG.

yigitfindikli avatar Dec 18 '18 12:12 yigitfindikli

The p-autocomplete component from PrimeNG (version ^16.0.0) when used with long or lengthy data/input, the autocomplete items sometimes display out of the screen. This issue happens in Angular 16 application. How can we ensure that dropdown items are fully shown within the boundaries of the screen?

image

harishcn2 avatar Jul 05 '24 06:07 harishcn2