Skip to content

Commit

Permalink
fix(primeng/p-overlay): not correctly condition for resize overlay co…
Browse files Browse the repository at this point in the history
…ntainer

Fixes primefaces#12769.
  • Loading branch information
volvachev authored and Egor Volvachev committed Mar 23, 2023
1 parent c575680 commit 930f4f3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/components/dom/domhandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ export class DomHandler {

public static alignOverlay(overlay: any, target: any, appendTo: any = 'self', calculateMinWidth: boolean = true) {
if (overlay && target) {
calculateMinWidth && (overlay.style.minWidth || (overlay.style.minWidth = DomHandler.getOuterWidth(target) + 'px'));
if (calculateMinWidth) {
overlay.style.minWidth = `${DomHandler.getOuterWidth(target)}px`;
}

if (appendTo === 'self') {
this.relativePosition(overlay, target);
Expand Down Expand Up @@ -149,6 +151,7 @@ export class DomHandler {
left = targetOffset.left - relativeElementOffset.left;
}

console.log(left);
element.style.top = top + 'px';
element.style.left = left + 'px';
}
Expand Down

0 comments on commit 930f4f3

Please sign in to comment.