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

Virtual keyboard dismisses when focus moves from image/video caption to paragraph #1221

Closed
hypest opened this issue Jul 12, 2019 · 2 comments · Fixed by #1245
Closed

Virtual keyboard dismisses when focus moves from image/video caption to paragraph #1221

hypest opened this issue Jul 12, 2019 · 2 comments · Fixed by #1245
Assignees
Labels

Comments

@hypest
Copy link
Contributor

hypest commented Jul 12, 2019

Steps to reproduce:

  1. Run the demo app
  2. Tap on the image (or video) block to select it
  3. Tap in its caption. The virtual keyboard should come up.
  4. Tap in a paragraph or heading block
  5. Notice the virtual keyboard becoming dismissed while the focus and caret is in the paragraph block
@mchowning
Copy link
Contributor

mchowning commented Jul 12, 2019

Also observed this in v1.8.0 (6025fe9).

I did observe that the issue did not always occur (most of these tests were with an image caption, but video captions appeared to behave similarly):

Switching away from image with empty caption

Scenario Frequency of Issue Occurring
Image had no caption, and no text added to caption Always
Image had caption, caption was entirely deleted Usually

Switching away from image with non-empty caption

Scenario Frequency of Issue Occurring
Had no caption, and text added to caption Never
Had caption, and caption was not changed Never
Had caption, caption was entirely deleted, text was added back to caption (all done while not losing focus on the caption) Infrequently

The fact that having a caption avoids the issue when you delete and re-add the caption (sometimes) was pretty surprising to me. 🤔 Seems like I haven't really isolated the behavior well.

Possibly Related Issue

I also observed the keyboard-dismiss-behavior occur infrequently (was pretty rare though) when returning to the caption:

  1. Heading block selected with keyboard open
  2. Tap on non-empty caption
  3. Observe the keyboard dismissed.

@mchowning
Copy link
Contributor

A bit of additional info for whoever picks this up (in case it's not me): the issue appears to be related to the fact that we do not render the component for an empty caption if the image/video block is not selected. Changing it so that the caption component always renders, even if it's empty, prevents the keyboard from dismissing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants