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

Pressing enter while writing the post title will add a new line in the title #3081

Closed
mrfoxtalbot opened this issue Jan 31, 2021 · 7 comments
Labels

Comments

@mrfoxtalbot
Copy link

mrfoxtalbot commented Jan 31, 2021

Pressing enter while editing the title will add a "line break" inside the title, instead of jumping to the content and adding a new block right under the title.

Expected behavior

I expected to be able to move from the post/page title to the very first block in the post/page, similarly to the way the editor works in the desktop/browser version.

Actual behavior

Instead of taking me to the first block in the post, the editor seemed to add a new line break within the title itself.

Steps to reproduce the behavior

  1. Create a new post
  2. Start writing a title
  3. Press enter in order to skip from the title to the content

screenshot_20210131-1812336937864444768550643 screenshot_20210131-181240__011965924123491980255

Tested on [device], Android [version], WPAndroid [version]

OnePlus 6.
Android 8.1.0
V 16.6.rc-2

@peril-wordpress-mobile
Copy link

Fails
🚫

Please add a type label to this issue. e.g. '[Type] Enhancement'

🚫 Please add a feature label to this issue. e.g. 'Stats'

Generated by 🚫 dangerJS

@designsimply designsimply transferred this issue from wordpress-mobile/WordPress-Android Feb 1, 2021
@designsimply
Copy link
Contributor

Thanks for reporting this @mrfoxtalbot!

Appears to be a regression of #1057. @jhnstn would it be possible to fit this one in as part of your maintenance rotation this week?

@designsimply designsimply added [Type] Bug Something isn't working Writing Flow labels Feb 1, 2021
@jhnstn
Copy link
Member

jhnstn commented Feb 8, 2021

I've dug into this but haven't been able to pin point the issue (I've run into a local debugging issue). What I found so far is that
this onEnterKey callback is not fired when the character preceding the cursor is alpha numeric. If there is a space or punctuation (I've only tested this later bit with a few characters) the callback is fired and you see the expected behavior.

I got stuck trying to debug these two code blocks #, # in the Aztec Android editor.

I believe that handleBackspaceAndEnter in Gutenberg is being called for enter key events (in the cases described above) but it looks like that function is only being registered for hardware key events only. I also noticed that in the Aztec demo app I am not able to see that function being called with a soft keyboard. This is where I got stuck. I was unable to load the Aztec Android library locally in Gutenberg so I could debug these observations.

tl;dr I can only reproduce the issue when the character preceding the cursor is alpha numeric. In this case I noticed a onEnterKey callback is not being called.

@guarani
Copy link
Contributor

guarani commented Sep 16, 2021

I wasn't able to reproduce this issue on the latest versions of the apps. I tried both the Samsung Keyboard and the Gboard. Here's a video on WPAndroid 18.2-rc-3 where I fail to reproduce:

Screen_Recording_20210916-153509_WordPress.mp4

I can only reproduce the issue when the character preceding the cursor is alpha numeric.

I specifically tried reproducing by putting the cursor after an alphanumeric character. I'm not sure if the underlying issue has now been fixed or instead I'm not following the correct steps to reproduce.

Sidenote: I wasn't able to reproduce on iOS and don't see any mention here of iOS, so I'll just add the "[OS] Android" label here to indicate this is Android-specific.

@mrfoxtalbot
Copy link
Author

I can no longer reproduce it in Android either (Alpha-319). I will defer to you @designsimply, but I think we can close this one.

@guarani
Copy link
Contributor

guarani commented Sep 17, 2021

Thanks for confirming it's no longer reproducible, @mrfoxtalbot!

@mchowning do you agree we can close this? (I believe @designsimply is not actively working on this project.)

@mchowning
Copy link
Contributor

👍 Yes, let's close it!

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

No branches or pull requests

5 participants