GBoard Keyboard New line in existing bullet formatting

tracked

#1

Steps to reproduce

Using GBoard Keyboard (default on Pixel/Pixel XL, also available here: https://play.google.com/store/apps/details?id=com.google.android.inputmethod.latin)

When pressing enter just before a word, the word ends up duplicated. If a space is added prior to the word the expected results.

When trying at the beginning of a sentence, the first word will remain and the rest will be on the new line. (Example B)

Example line:

  • This is a test

Press enter immediately before the a.

Expected result

Expected:

  • This is
  • a test

Expected (B)

  • This is a test

Actual result

Actual:

  • This is
  • aa test

Example B:

  • This
  • is a test

Environment

Android O (8.0). GBoard keyboard.


Additional information

In addition to installing GBoard, if you use the Android Studio IDE or an Android emulator with the ASOP build image it will have the GBoard installed.


Additional comments


Hitting enter will make new line at wrong place
#2

Hi @butlermatt, sorry for digging this up :grimacing:! We’re cleaning up the bugs and would like to know if the bug is still happening to you?


#3

Yep. I’m still seeing this behaviour. Different phone (Pixel 2 XL now instead) but same GBoard keyboard. For both examples above I get the same behaviour


#4

FWIW, I always use Gboard on iOS and I’m not seeing the issue. Both cases come out as expected result.


#5

Experiencing same. On Android, using gboard (don’t think this is a gboard issue though, I’ve seen this with BlackBerry keyboard as well). It happens if you are using dynalist from browser as well. undo gets rid of the double word.


#6

Ok, I was finally able to repro this issue.

That might be a result how GBoard is implemented differently for iOS :confused:

I just took a look at the code and it looks like we have already done event.preventDefault() when you press Enter, but GBoard still proceeds to use the auto-correction result. Not sure if there’s anything we can do about it, except for somehow reading what GBoard will auto-correct and remove that part manually (and only on Android!).

:thinking:

In any case, we have tracked this bug on our todo list.

@Shida are we doing anything extra when pressing Enter that results in such behavior?


#7

I don’t think so… Based on the behavior, I think GBoard probably sends an autocorrect (text change) event, then the enter keypress event, which means we don’t really have a way to prevent that.

I’ll see what I can do…


#8

I see all kinds of messed up behavior with GBoard on iOS. When I create a new list item and hit enter, sometimes I get a newline WITHIN the bullet rather than a new bullet. Then when I hit delete I get a completely mangled entry.

I attached some screenshots.

  1. I hit Enter with my cursor at the end of INBOX
  2. I tried to type test (it autocorrected to eat) and hit enter (not sure if autocorrect is part of it)
  3. Newline is inside bullet
  4. Hit backspace
  5. INBOX is completely mangled, no idea where the B came from

#9

Note in the first image you can see the double height line. The cursor is actually below Eat on the left margin. The second image is after hitting backspace from that position. I’m guess the st comes from the pre-autocorrect attempt to type “test”.


#10

That do look messed up.

Have you tested with the system keyboard app? In other words, is it clear that it’s an issue only with GBoard? Thanks in advance.