tonysamperi / ngx-popperjs

An Angular 8+ wrapper for @popperjs/core
https://tonysamperi.github.io/ngx-popperjs/
MIT License
65 stars 12 forks source link

BUG: when setting the style to min-height or min-width in the popperStyles property the popper is opened at once without calling the click event #58

Closed AdamsContreras999 closed 1 year ago

AdamsContreras999 commented 1 year ago

version 16.0.4 when setting the style to min-height or min-width in the popperStyles property the popper is opened at once without calling the click event

check this example please https://stackblitz.com/edit/stackblitz-starters-4y8lgy?file=package.json,src%2Fmypopper%2Fmypopper.component.ts

image image

tonysamperi commented 1 year ago

Why would you set min-width and min-height that way? Just use CSS. I know that applied styles override the CSS. I can't set a default for every CSS property. There's no choice right now, due to the Chrome bug.

bersling commented 1 year ago

But do you really have to apply the popperStyles and the popperApplyClass when the popup is closed? Can you not conditionally only apply those when the popup is shown? Would that not solve all the problems we're having now?

tonysamperi commented 1 year ago

But do you really have to apply the popperStyles and the popperApplyClass when the popup is closed? Can you not conditionally only apply those when the popup is shown? Would that not solve all the problems we're having now?

No it wouldn't solve anything and it would risk introducing more regressions. Plus it would degrade the performance if I added conditionals on everything.