tonysamperi / ngx-popperjs

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

Chrome Version 115.0.5790.102 seems to have broken positioning #52

Closed KalliMan closed 1 year ago

KalliMan commented 1 year ago

After upgrade to the latest chrome, the popper positionning does not work correctly enymore.

The easiest way to reproduce the problem is using the supplied examples: https://tonysamperi.github.io/ngx-popperjs/

It is reproducible at least on " OVERFLOW PREVENTION", "OPEN ON CLICK", "OPEN ON CLICK + CLOSE ON SCROLL" examples. What is interesting that scrolling fixes the position of the popper.

Note: The same issue is reported for the ngx-popper: https://github.com/MrFrankel/ngx-popper/issues/180

tonysamperi commented 1 year ago

I'm removing a few comments with weird CSS solutions, because mostly they don't work at all. I'm working at the fix but it's not simple.

muneeb26 commented 1 year ago

Hey @tonysamperi do you know when there will an official fix released for this?

tonysamperi commented 1 year ago

@muneeb26 hi, I should be able to release something at least for v16 this week!

AdamsContreras999 commented 1 year ago

great Mr we would be grateful for this solution @tonysamperi

tonysamperi commented 1 year ago

@serhiisol this is what I'm talking about. If it's not visible (opacity) but not hidden (block) you won't be able to click "My action". Also in this specific scenario, a part of the popper covers the trigger, so if I click there, the popper won't show!

image

tonysamperi commented 1 year ago

Yeah, but that I don't like as well, because in a first instance the popper is shown somewhere and when you recalculate it moves... I think I got the right solution though... Keep you posted

tonysamperi commented 1 year ago

It shouldn't be a problem for the case if appendTo set to body. @tonysamperi do you need help with the solution?

No, don't worry I'll figure this out. Btw in v17 I could be migrating to the new floating UI lib...

Cheers

zanaBizz commented 1 year ago

@tonysamperi Is the fix also going to be backported to v15 for users who haven't yet migrated to using Angular v16?

tonysamperi commented 1 year ago

@zanaBizz yes. I was waiting to see if it was stable on v16. Right choice, since there was a teeny tiny bug. Should publish v15 and v14 and v13 in a few hours...I'm also going to check how many usages of v12 still there...

YevheniiPuzyrenko commented 1 year ago

Hi, @tonysamperi ! is the fix gonna be ported to v13 also ?

tonysamperi commented 1 year ago

Hi, @tonysamperi ! is the fix gonna be ported to v13 also ?

Yes! Later today!

serhiiuq commented 1 year ago

The issue also happens when popperAppendTo="body" is specified on the first event. Note: happens with the latest update.

tonysamperi commented 1 year ago

Ok everybody. I figured the real fix. I was so close, but I didn't consider I needed to skip a frame. I'm reverting to the 16.0.1 and applying the real fix (with v 16.0.6 and of course the v 15 14 and 13)

Thanks @solo-unitq because I got that to fix the "append to body".

AdamsContreras999 commented 1 year ago

Bien, todos. Me di cuenta de la solución real. Estaba tan cerca, pero no consideré que necesitaba saltarme un cuadro. Estoy volviendo a la versión 16.0.1 y aplicando la solución real (con la versión 16.0.6 y, por supuesto, la versión 15, 14 y 13)

Gracias@solo-unitqporque obtuve eso para arreglar el "agregar al cuerpo".

please man ! awesome!

kundralaci commented 1 year ago

Ok everybody. I figured the real fix. I was so close, but I didn't consider I needed to skip a frame. I'm reverting to the 16.0.1 and applying the real fix (with v 16.0.6 and of course the v 15 14 and 13)

Thanks @solo-unitq because I got that to fix the "append to body".

Thank you very much for hunting down this bug! Can you please also port it back to the 12 version? (Yes, I know we really need to update, but it's not my decision, unfortunately... thank you again!)

EdoMagen commented 1 year ago

Thank you @tonysamperi !

tonysamperi commented 1 year ago

Hi all, released the new versions for v16, 15 and 14. Tomorrow 13 and 12.

tonysamperi commented 1 year ago

Released v 13 and 12!

aleksander351 commented 1 year ago

It shouldn't be a problem for the case if appendTo set to body. @tonysamperi do you need help with the solution?

No, don't worry I'll figure this out. Btw in v17 I could be migrating to the new floating UI lib...

Cheers

@tonysamperi After updating to the latest version, sometimes the vertical position is still not calculated correctly. It occurs on Edge as well as on Chrome browsers. I.e. the y value after the first click is 397, whereas on the second try it's 257, which is correct.

position-1 position-3

tonysamperi commented 1 year ago

@aleksander351 please create a blitz reproducing the problem and report all the info, including OS, RAM, etc.

ahmedataulkareem commented 1 year ago

I am facing the same issue as @aleksander351. It renders the pop-up correctly but sometimes doesn't calculate the vertical length properly which results in rendering the pop-up at the wrong place. Facing this issue with Angular v14 and ngx-popperjs v14.1.8

image image

Added the s.s for the following when the error reoccurs

tonysamperi commented 1 year ago

@ahmedataulkareem man, same reply as aleksander...please create a blitz!

aleksander351 commented 1 year ago

@ahmedataulkareem man, same reply as aleksander...please create a blitz!

we solved it with the position: unset; workaround for now.