You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Blocks Overlapping Eachother in Editor on Firefox #19476
When adding new blocks in Firefox 71 they appear overlapping existings blocks. This behaviour was not encountered in Safari when tested on MacOS Catalina.
The blocks don't push the next block out of the way and appear on top of eachother. I've replicated this using private blocks in a client project, and in frontenberg with the latest gutenberg
Of note this doesn't happen with paragraph blocks and bullet lists, but does happen with columns, and sometimes it jumps to the correct layout
To reproduce
Steps to reproduce the behavior:
Add a block or blocks
Observe overlapping
Expected behavior
I expect behaviour to match behaviour in Safari as is normal for block insertion
Hi @tomjn@iniOr - apologies for the amount of time responding, there's a bit of a backlog of new issues that I'm trying to triage.
I couldn't reproduce this issue in Firefox 72 using Gutenberg 7.1, though I am still on Mojave (and not quite ready to upgrade yet).
It does feel like there'd be a huge number of reports of this issue. Anything unique about your environments that you can think of that might help with a reproduction? Browser add-ons?
I can’t reproduce this using Firefox 71 on Catalina. I followed the steps in the video and used https://frontenberg.tomjn.com/. There was a brief flash where it looked like the Columns block overlapped the List block, but then everything was fine.
I still get this with latest Gutenberg and the latest Firefox:
The thing is initially it behaves as expected, but you have to interact and insert blocks to reproduce it. I don't believe the instructions to reproduce are reliable, there is something else going on that's needed and i haven't identified how. I just know that pretty much all attempts to use the block editor in Firefox eventually lead to this problem. Using images and custom blocks seem to reproduce this easier than using paragraphs. Paragraphs themselves only show the issue in the context of other non-paragraph blocks
Of note, saving as a draft and re-loading the page shows the blocks as they're meant to be shown, and I can interact with them fine:
The problem reappears when I try to insert a block though. I used the inserter to add a heading between the two images, and it showed normally for a brief moment then dissapeared behind the block underneath. It shows normally when I type in the block but then reverts back to the overlapping behaviour:
I also managed to reproduce this bug by using the mover controls. The block does not move when using the arrows, and subsequent clicks causes more overlapping, gaps, and confusion:
I would also note that between this comment and the previous comment, I turned on reduce motion in system preferences, and closed/reopened Firefox. This was based on a hunch that this is related to block movement animations. I suspected this because I could find only one case of translate3d in a github search which referenced animation of blocks when moving them, and the checking of motion preferences in packages/block-editor/src/components/block-list/moving-animation.js
This is all in 73.0.1 (64-bit) on Catalina 10.15.3 (19D76), Gutenberg Version 7.6.0 with the WP beta tester plugin active and updated to today ( March 9th ). I get similar results in other WP installs with varying combinations of 5.3 + GB. I have duck duck go privacy installed and decentraleyes, turning them off does not resolve the problem
It also seems that window.matchMedia('(prefers-reduced-motion: reduce)') returns false for me despite it being turned on at the OS level when using Firefox 73 :/ I can't find a way to force the block editor to behave as if it's set via the console to test this theory
The problem is eliminated when adding this CSS rule:
.wp-block{transform: none !important;}
With this in place, block movement is instantaenous and I can no longer reproduce the issue. My suspicion is that it begins an animation when a block moves or is inserted/removed, but because the animation is implemented in JS rather than CSS, and the animation never "ticks", it gets stuck on the first frame. I'm unsure why this is the case in Firefox but not Chrome/Safari
react-spring is being used for block movement animations, hence why blocks are overlapping, and why animations never happen, they begin but cannot progress.
Turning off the privacy fingerprinting resist option resolve the issue
I'd be happy if we could just force animations off regardless of reduce motion preferences. As great as having our cake and eating it would be, privacy > animations. Perhaps a checkbox in the options panel
@paaljoachim Issue is reproducible in WordPress 5.7. Firefox Developer Edition 89.0b9 on Windows 7.
Steps to reproduce: Copy / paste several paragraphs of text (from lipsum.com in my case) and move them up / down using block moving controls. Result can be seen below:
Toggling of privacy.resistFingerprinting in about:config immediately recovers blocks appearance.
@paaljoachim There is interesting nuance that can only be seen in action so I've recorded small video, see below.
Please notice that as soon as privacy.resistFingerprinting setting is turned off - all stuck animations are automatically get resumed and played till the end.
So probably the only thing that is required for the fix is to detect fingerprint resistance and either disable animations or find out what prevents them from completion. It is also possible to submit bugreport with request for comments from Mozilla engineers.
🙈 So when privacy.resistFingerprinting is true FF will reduce the JavaScript time precision to 100 ms!
For context, animations need 16ms frames to achieve 60 frames per second. So a resolution of 100ms is going to do really funny things with any sort of animation, regardless of what framework we're using.
In Firefox, you can also enable privacy.resistFingerprinting — this changes the precision to 100ms or the value of privacy.resistFingerprinting.reduceTimerPrecision.microseconds, whichever is larger.
Activity
iniOr commentedon Feb 2, 2020
Same issue here on FF 72.0.4, what a mess.
26 days later no comments no news on when this will be fixed ?
talldan commentedon Feb 5, 2020
Hi @tomjn @iniOr - apologies for the amount of time responding, there's a bit of a backlog of new issues that I'm trying to triage.
I couldn't reproduce this issue in Firefox 72 using Gutenberg 7.1, though I am still on Mojave (and not quite ready to upgrade yet).
It does feel like there'd be a huge number of reports of this issue. Anything unique about your environments that you can think of that might help with a reproduction? Browser add-ons?
noisysocks commentedon Feb 5, 2020
I can’t reproduce this using Firefox 71 on Catalina. I followed the steps in the video and used https://frontenberg.tomjn.com/. There was a brief flash where it looked like the Columns block overlapped the List block, but then everything was fine.
iniOr commentedon Feb 6, 2020
Just got the issue using the latest version of Firefox 72.0.2 on Linux Mint 19.3
On the screenshot you can clearly see tag cloud block overlapping latest posts block.
Currently editing a page with this bug is really hard.
Just tested with Firefox 72.0.2 on WIndows 10 and i can't reproduce the issue.
iniOr commentedon Feb 7, 2020
Seems that using one the following Firefox addons may be the cause of this issue :
-Ublock Origin
-Privacy Badger
What I don't understand is that Gutenberg works with no issue on Windows with those extensions enabled.
Disabling them on Linux mint 19.3 fixes the problem for me.
EDIT : after some usage the issue comes back, even with previously mentioned add-ons disabled.
tomjn commentedon Mar 9, 2020
I still get this with latest Gutenberg and the latest Firefox:
The thing is initially it behaves as expected, but you have to interact and insert blocks to reproduce it. I don't believe the instructions to reproduce are reliable, there is something else going on that's needed and i haven't identified how. I just know that pretty much all attempts to use the block editor in Firefox eventually lead to this problem. Using images and custom blocks seem to reproduce this easier than using paragraphs. Paragraphs themselves only show the issue in the context of other non-paragraph blocks
tomjn commentedon Mar 9, 2020
Of note, saving as a draft and re-loading the page shows the blocks as they're meant to be shown, and I can interact with them fine:
The problem reappears when I try to insert a block though. I used the inserter to add a heading between the two images, and it showed normally for a brief moment then dissapeared behind the block underneath. It shows normally when I type in the block but then reverts back to the overlapping behaviour:
https://www.youtube.com/watch?v=2jOGygMf6b4
tomjn commentedon Mar 9, 2020
If the heading block is removed, a gap appears inbetween the 2 image blocks.
I believe a contributor to this issue is a transform CSS parameter being applied to the next block element:
For whatever reason, every block after the heading has the same
-108pxtransform:tomjn commentedon Mar 9, 2020
I also managed to reproduce this bug by using the mover controls. The block does not move when using the arrows, and subsequent clicks causes more overlapping, gaps, and confusion:
Here's another recording:
https://www.youtube.com/watch?v=FxxlG2d0yf0
I would also note that between this comment and the previous comment, I turned on reduce motion in system preferences, and closed/reopened Firefox. This was based on a hunch that this is related to block movement animations. I suspected this because I could find only one case of
translate3din a github search which referenced animation of blocks when moving them, and the checking of motion preferences inpackages/block-editor/src/components/block-list/moving-animation.jsThis is all in
73.0.1 (64-bit)on Catalina10.15.3 (19D76), GutenbergVersion 7.6.0with the WP beta tester plugin active and updated to today ( March 9th ). I get similar results in other WP installs with varying combinations of 5.3 + GB. I have duck duck go privacy installed and decentraleyes, turning them off does not resolve the problemtomjn commentedon Mar 9, 2020
It also seems that
window.matchMedia('(prefers-reduced-motion: reduce)')returnsfalsefor me despite it being turned on at the OS level when using Firefox 73 :/ I can't find a way to force the block editor to behave as if it's set via the console to test this theorytomjn commentedon Mar 9, 2020
The problem is eliminated when adding this CSS rule:
With this in place, block movement is instantaenous and I can no longer reproduce the issue. My suspicion is that it begins an animation when a block moves or is inserted/removed, but because the animation is implemented in JS rather than CSS, and the animation never "ticks", it gets stuck on the first frame. I'm unsure why this is the case in Firefox but not Chrome/Safari
tomjn commentedon Mar 9, 2020
I have found the source of the problem
The
react-springlibrary does not work whenprivacy.resistFingerprintingis set to true inabout:config. Here is the relevant issue:pmndrs/react-spring#664
react-springis being used for block movement animations, hence why blocks are overlapping, and why animations never happen, they begin but cannot progress.Turning off the privacy fingerprinting resist option resolve the issue
1 remaining item
tomjn commentedon Mar 18, 2020
I'd be happy if we could just force animations off regardless of reduce motion preferences. As great as having our cake and eating it would be, privacy > animations. Perhaps a checkbox in the options panel
youknowriad commentedon Mar 18, 2020
@tomjn Agreed, this is tracked here #16354
paaljoachim commentedon Apr 15, 2021
Hey @tomjn Tom is this issue still valid?
tomjn commentedon Apr 15, 2021
FlyingDR commentedon Apr 15, 2021
@paaljoachim Issue is reproducible in WordPress 5.7. Firefox Developer Edition 89.0b9 on Windows 7.
Steps to reproduce: Copy / paste several paragraphs of text (from lipsum.com in my case) and move them up / down using block moving controls. Result can be seen below:
Toggling of
privacy.resistFingerprintinginabout:configimmediately recovers blocks appearance.paaljoachim commentedon Apr 15, 2021
Ugh...not good... Hopefully someone can pick it up and fix it.
Thanks for testing @FlyingDR Alexander!
FlyingDR commentedon Apr 16, 2021
@paaljoachim There is interesting nuance that can only be seen in action so I've recorded small video, see below.
Please notice that as soon as
privacy.resistFingerprintingsetting is turned off - all stuck animations are automatically get resumed and played till the end.So probably the only thing that is required for the fix is to detect fingerprint resistance and either disable animations or find out what prevents them from completion. It is also possible to submit bugreport with request for comments from Mozilla engineers.
mcsf commentedon Apr 16, 2021
Seems to be fixed in
react-springas ofv9rc3, so it should be a matter of upgrading that dependency in Gutenberg, if someone is interested.paaljoachim commentedon Apr 16, 2021
Perhaps @gwwar Kerry is able to check it out later on.
gwwar commentedon Apr 19, 2021
Yes, this is still an issue. Tested on OSX/FF88:
overlap.mp4
gwwar commentedon Apr 19, 2021
I'm at EOD but here's a quick draft PR of the dep update: #30979
gwwar commentedon Jul 14, 2021
🙈 So when
privacy.resistFingerprintingis true FF will reduce the JavaScript time precision to 100 ms!For context, animations need 16ms frames to achieve 60 frames per second. So a resolution of 100ms is going to do really funny things with any sort of animation, regardless of what framework we're using.
https://developer.mozilla.org/en-US/docs/Web/API/Performance/now#reduced_time_precision
We might need to test if we need to add the following headers to enable higher precision:
tomjn commentedon Jul 14, 2021
For those unaware, the last comment makes more sense after reading this:
#30979 (comment)
gwwar commentedon Sep 15, 2021
This one should be fixed by #30979