-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search inserter - Issue when searching a block while the title is focused #30562
Comments
Hey @jhnstn 👋 have you encountered this issue before? |
@geriux I have not run into this issue. Thanks for catching it! |
Just a note that I was not able to reproduce this issue, but @dcalhoun was with his iOS device. When I tested it I did it with an emulator and simulator. I'll test again using physical devices today and see if I can reproduce the issue that way and report back. |
@jhnstn I wasn't able to replicate this issue on any of my Android devices, but was able to do it with my physical iPhone 11 (iOS v. 14.4.2): screencapture-1618854323923.mp4 |
I spent some time investigating this and although I didn't manage to solve the issue, here's what I found: Focus loop affects all blocksFirst of all, in my testing, this issue (the focus loop) is not specific to the post title. It also happens when any block (e.g. a Paragraph block) has an input which has keyboard focus AND has some text in it AND then a block is inserted via the block inserter search. RN 0.64 upgrade did not fix focus loopI found this issue to still be present on Focus loop is not specific to the Block Inserter SearchIn my testing, any input field (e.g. a raw
Next stepsI don't think this issue is related to the block inserter search itself (as noted above). One area of interest in this investigation was the code that enables the editor to return keyboard focus back to the input that had keyboard focus prior to the bottom sheet being opened. It's conceivable that this code could be key to understanding the cause of this focus bug. |
I'm updating this sentence of the original issue to indicate that the bug is present on other blocks – as long as that block has text (i.e. is not empty) – see video below. Worth noting that I'm testing using RN 0.64 and iOS 14.5. plain-paragraph.mov |
Description
While testing something on develop, I found an issue with the Search inserter, since it's still under
DEV
is not a blocker or anything but definitely something to be fixed before releasing this feature.If you have the Title component focused and then try to add a block by using the Search inserter, something weird happens with the focus, looks like it gets into a loop.
Note:
This doesn't happen if a Paragraph block is focused instead of the title.This does happen if a Paragraph block is focused instead of a title – as long as that block has text (i.e. is not empty) – see video below in #30562 (comment).Step-by-step reproduction instructions
If using demo app:
If using the WordPress app:
Next steps:
+
to open the Inserter.Buttons
.Buttons
block to add it.Expected behaviour
Buttons
block should be focused after adding it without any focus issues.Actual behaviour
Buttons
block you can't, seems like it gets into a focus loop.Screenshots or screen recording (optional)
SearchInserter.mov
Device information
The text was updated successfully, but these errors were encountered: