Closed annezazu closed 4 days ago
Thanks, @annezazu! This is an interesting issue.
Did you also notice any performance degradation? We have some reports related to Inserter + Pattern performance, and I wonder if they are related. See: #64732.
A possible fix will ship with Gutenberg 19.2 - #64902.
I didn’t notice anything with performance when I was clicking around! It could be that that’s the underlying cause though but it wasn’t discernible to me.
I can also reproduce the issue on the Gutenberg trunk, but I'm having trouble finding a consistent way to do it.
I tracked down the bug to the useInBetweenInserter
hook. The openRef.current
is set to true
permanently, which prevents any other in-between inserters from displaying. Unfortunately, I'm still not sure what is causing this behavior.
Update: I think I found a consistent way to reproduce the bug. It looks like the onSelectOrClose
is never called when moving focus to a different block on canvas.
https://github.com/user-attachments/assets/72570272-d33d-44aa-9410-804a05556208
This is fixed on the trunk. See: #65208.
Using WordPress 6.6.2 and Gutenberg 19.1 in a playground instance, I noticed that, after a first few times, the quick inserter suddenly becomes very hard to initiate. I can't quite understand why but here's a longer video showing how suddenly the same areas where I could use the quick inserter no longer cause it to appear:
https://github.com/user-attachments/assets/6bac378a-9786-47da-87e9-6f82a6b3005a
I can reliably replicate it using TT4 and just clicking around and trying to get it to appear.