react-popover icon indicating copy to clipboard operation
react-popover copied to clipboard

fix: popover glitch, tip jumps #125

Open AvraamMavridis opened this issue 7 years ago • 5 comments

This tries to fix the https://github.com/littlebits/react-popover/issues/125

On popoverResize event is firing even if the size of the popover haven't really changed (due on the late attachement of the tip to the containerEl), the popoverResize re-resolvePopoverLayout causing the jumping glitch. You can see that the event is firing even in the first toggle, and the diff of the height is exactly the size of the tip.

fix-glitch

This tries to fix it by ensuring that the resize is at least > than the tipSize.

AvraamMavridis avatar Sep 05 '17 14:09 AvraamMavridis

I would like to test/evaluate on it a bit more, so if anyone else has the issue and can npm -i directly from the fork in their project to test locally and give feedback, would be much appreciated.

AvraamMavridis avatar Sep 05 '17 14:09 AvraamMavridis

With your fix:

kapture 2017-09-13 at 19 03 16

Without:

kapture 2017-09-13 at 19 05 49

I have a bug in both cases the initial position of the popover seems off.

Kerumen avatar Sep 13 '17 17:09 Kerumen

@Kerumen thx for the feedback, I will check it more in deep.

AvraamMavridis avatar Sep 13 '17 18:09 AvraamMavridis

@AvraamMavridis I reported the initial layout position bug here: https://github.com/littlebits/react-popover/issues/62#issuecomment-329233980

Kerumen avatar Sep 13 '17 19:09 Kerumen

@AvraamMavridis Thanks so much for your contribution! This has been a long outstanding rough edge that I'd like to see get fixed. I don't have time to help out on this PR at the moment but if you get this into a perfected state I would be more than happy to try and get this merged.

jasonkuhrt avatar Sep 22 '17 00:09 jasonkuhrt