Primeng: p-calendar overlay closes unexpectedly in p-cellEditor

Created on 9 Aug 2019  路  6Comments  路  Source: primefaces/primeng

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

[X] bug report (regression)

Plunkr Case (Bug Reports)

https://stackblitz.com/edit/github-yxy3bm

Current behavior

If a calendar is used inside an editable table cell:

  • The calendar overlay disappears when the dropdown-list for months is clicked on Firefox.
  • The calendar overlay disappears when the dropdown-list for months is clicked a second time on Chrome.

Expected behavior

The calendar overlay stays open when a month is going to be selected.

Minimal reproduction of the problem with instructions

Put a p-calendar [monthNavigator]="true" [yearNavigator]="true" inside of a p-cellEditor as seen on https://stackblitz.com/edit/github-yxy3bm

  • click the table cell to open the calendar overlay
  • click on the dropdown list for month: Overlay disappears on Firefox, works on Chrome
  • click on the dordownn list for month again (not an entry): Overlay disappears on Chrome

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

I like to continue to use dates in editable table cells after updating to PrimeNG 8.0.2. The issue was introduced by commit 8f439c35de07abcad01a680c70a7a635583404ff

Please tell us about your environment:

  • Angular version: 8.1.2
  • PrimeNG version: 8.0.2
  • Browser: Chrome 76.0.3809.87 | Firefox 68.0.1
  • Language: TypeScript

Most helpful comment

@nhnb Maybe you can start a pull request for your changes?

All 6 comments

Any news?

I have the same problem. Can it be fixed?

@nhnb Maybe you can start a pull request for your changes?

@nhnb Maybe you can start a pull request for your changes?

@rroex I did a pull request last August: https://github.com/primefaces/primeng/pull/8043

@cagataycivici Can you have a look?

If you remove appendTo body it works, when the overlay is appended to body, table thinks outside is clicked and closes the cell so the calendar is removed. Without appendTo="body" no such problem occurs. One of the tricky parts of cell selection and overlays.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pchristou picture pchristou  路  3Comments

mitosandov picture mitosandov  路  3Comments

philly-vanilly picture philly-vanilly  路  3Comments

KannanMuruganmony picture KannanMuruganmony  路  3Comments

jisqaqov picture jisqaqov  路  3Comments