Skip to content
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

Focus loop on Rich Text #1696

Closed
pinarol opened this issue Dec 18, 2019 · 7 comments · Fixed by WordPress/gutenberg#53217
Closed

Focus loop on Rich Text #1696

pinarol opened this issue Dec 18, 2019 · 7 comments · Fixed by WordPress/gutenberg#53217
Assignees
Labels
[Status] Blocked [Type] Bug Something isn't working

Comments

@pinarol
Copy link
Contributor

pinarol commented Dec 18, 2019

Describe the bug
I am using the html snippet here:

<!-- wp:group -->
<div class="wp-block-group"><div class="wp-block-group__inner-container"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link">Button</a></div>
<!-- /wp:button -->

<!-- wp:image {"id":984,"sizeSlug":"large"} -->
<figure class="wp-block-image size-large"><img src="https://pinarspremiumtestsite123443.files.wordpress.com/2019/12/img_0111.jpg?w=1024" alt="" class="wp-image-984"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Faded from</p>
<!-- /wp:paragraph -->

<!-- wp:group -->
<div class="wp-block-group"><div class="wp-block-group__inner-container"></div></div>
<!-- /wp:group -->

<!-- wp:group -->
<div class="wp-block-group"><div class="wp-block-group__inner-container"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link">Button 2</a></div>
<!-- /wp:button --></div></div>
<!-- /wp:group --></div></div>
<!-- /wp:group -->

<!-- wp:media-text {"mediaId":990,"mediaType":"image"} -->
<div class="wp-block-media-text is-stacked-on-mobile"><figure class="wp-block-media-text__media"><img src="https://pinarspremiumtestsite123443.files.wordpress.com/2019/12/img_0111-1.jpg" alt="" class="wp-image-990"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:media-text -->

<!-- wp:group -->
<div class="wp-block-group"><div class="wp-block-group__inner-container"></div></div>
<!-- /wp:group -->

<!-- wp:video -->
<figure class="wp-block-video"></figure>
<!-- /wp:video -->

<!-- wp:image {"id":987,"sizeSlug":"large"} -->
<figure class="wp-block-image size-large"><img src="https://pinarspremiumtestsite123443.files.wordpress.com/2019/12/img_0005-1-1.jpg?w=1024" alt="" class="wp-image-987"/></figure>
<!-- /wp:image -->

--->>> Make sure autocorrect is on

Select one of the sub-blocks of Group block
Add an image block in it, add some image
Add a paragraph under it
Type sth and make sure there's an autocorrect suggestion for it(if you pay attention to the gif, autocorrect kicks in and changes the text right after focus is lost)
(the text from autocorrect needs to be longer or shorter than the original text)
Tap navigation up button
Result: it is not able to change focus, the focus is stuck in paragraph

It is also reproducible on media-text, since it is already live we should fix this urgently.

Expected behavior
the focus shouldn't get stuck on paragraph block

focus-loop

Smartphone (please complete the following information):

  • Device: iPhone 11 Pro Max Simulator
  • OS: 13
  • commit: b6e5a23/develop
    using metro on
@pinarol pinarol added the [Type] Bug Something isn't working label Dec 18, 2019
@pinarol pinarol changed the title Focus anomaly on inner blocks Focus loop on Rich Text Dec 18, 2019
@pinarol
Copy link
Contributor Author

pinarol commented Dec 18, 2019

A very similar issue can be reproduced at commit: 3ff15cd which is before InnerBlock enhancements are merged.

And it is reproducible with just an image and a paragraph block:

focus-loop3

--->>> Make sure autocorrect is on

Add an image block in it, add some image
Add a paragraph under it
Type sth and make sure there's an autocorrect suggestion for it(if you pay attention to the gif, autocorrect kicks in and changes the text but it takes some trials)
(the text from autocorrect needs to be longer or shorter than the original text)
Tap on the image

Result: focus loop

I think these 2 has the same root cause but we are observing a stuck focus instead of focus loop in the latest develop, the symptoms can be differentiating because of the pointerEventsusage introduced with InnerBlock enhancements.

@pinarol
Copy link
Contributor Author

pinarol commented Dec 18, 2019

Auto correction should be turned on in order to repro it

37963D9B-D679-43C0-990A-ED02E657BE51

@designsimply
Copy link
Contributor

Received a report of this during 14.9 beta testing that I think is the same issue: #2294.

2294

@designsimply
Copy link
Contributor

This came up in an app review:

I love this app. I have always dreamt of becoming a writer, and I wrote lots of books, but this app allows me to share my stories to the world. I even can write about reality without feeling sad. But there is a really annoying bug. Whenever I am on a certain paragraph and I press ‘Enter’, I go to the next paragraph, but I suddenly switch to the one before. Then it goes back to the new paragraph, and it keeps repeating. It is very annoying, because it is very hard to access a switching paragraph. The only way to fix it is to publish or update it. Can you please solve this problem? It is very buggy indeed.

3-star review by BrainHigh1234 Jun 7 | WPiOS 14.9 | Singapore

@pinarol
Copy link
Contributor Author

pinarol commented Jun 11, 2020

@designsimply Thank you, we'll make a new fix about this but we need to update to RN 0.62.2 for that. @marecar3 Can I ask the state on that one, any estimates about when we can expect the merge? Thanks!

@marecar3
Copy link
Contributor

Hey 👋 @pinarol!

Thanks for asking. Currently, we have a blocker (random crash) in Android code which I am trying to figure out looking at a hermes stack trace.

I will let you know when we are ok to merge it as currently, I don't have clear estimation if that's ok with you?

@pinarol
Copy link
Contributor Author

pinarol commented Jun 12, 2020

Sure thank you @marecar3 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment