jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Forms: fix block inserter collapsing in Firefox

Open monsieur-z opened this issue 5 months ago • 4 comments

Fixes https://github.com/Automattic/jetpack/issues/39144

Proposed changes:

This draft PR explores fixing the issue linked above: in the latest versions of Firefox (reported in 129 and 128), the block inserter collapses when various actions are operated. For instance:

  • when the user starts typing in the search box
  • when the cursor hovers any Jetpack Forms block

This only happens with Jetpack Forms blocks. If we don't register those blocks, the inserter works seamlessly.

Block inserter Screenshot 2024-08-30 at 9 46 21 AM

It's been hard to reproduce the issue consistently every time. At times, the inserter collapses immediately. Other times, it takes 5 to 10 times hovering it. No error is logged in the console.

Other information:

  • [ ] Have you written new tests for your changes, if applicable?
  • [ ] Have you checked the E2E test CI results, and verified that your changes do not break them?
  • [ ] Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

n/a

Does this pull request change what data or activity we track or use?

No.

Testing instructions:

  • Spin a test site with this branch
  • Create a new post
  • Open the block inserter by clicking the + button
  • Ensure the search functionality works and the inserter does not collapse
  • Hover various forms blocks: the inserter should not collapse
  • Try hovering several times and at various speeds

monsieur-z avatar Aug 30 '24 14:08 monsieur-z