WordPress-Editor-Android icon indicating copy to clipboard operation
WordPress-Editor-Android copied to clipboard

API19+ autocorrect issues

Open aforcier opened this issue 10 years ago • 12 comments

This is a master list of issues caused by autocorrect/autocomplete in the API 19+ Chromium WebView:

  • [ ] Backspace on text after a blockquote or list causes buggy autocorrect on API22+ (#367)

Apparently solved (may have missed edge cases)

  • [x] Words are sometimes duplicated, the full cause is still under study (an example can be seen in the blockquote glitch video)

Solved

  • [x] ~~Formatting glitches with blockquotes: https://cloudup.com/cN0k8O4nIXV~~ (ref: PR #153 Issue #159)
  • [x] ~~Switching between the title and content fields doesn't work properly when in the middle of typing a word~~ (#158)
  • [x] ~~Posts beginning with a word that triggers autocorrection can have the paragraph formatting broken by autocorrect~~ (issue: https://github.com/wordpress-mobile/WordPress-Editor-Android/issues/389 PR: https://github.com/wordpress-mobile/WordPress-Editor-Android/pull/390)
  • [x] ~~Posts beginning with blockquotes on API23+ can have the blockquote stripped by autocorrect~~ (issue: https://github.com/wordpress-mobile/WordPress-Editor-Android/issues/385 PR: https://github.com/wordpress-mobile/WordPress-Editor-Android/pull/399)
  • [x] ~~Applying a style (e.g. bold, italics) while in the middle of typing a word (with visible suggestions) does not work~~ (issue: #123 PR: #427)

These happen consistently on stock Android devices, with the default system soft keyboard.

Notes on variations:

  • Hard keyboards don't use autocorrect and these issues don't affect them (could they under any circumstances?)
  • Samsung apparently has their own autocorrect (on all devices?), which may change things on those devices. Testing on an API 19+ Samsung device imminent (@bummytime)
  • Custom keyboards, IME, etc: WIP

aforcier avatar Jun 08 '15 20:06 aforcier

Formatting glitches with blockquotes: https://cloudup.com/cN0k8O4nIXV (ref: PR #153)

Testing on a Samsung S6 (API21) and I am not seeing this behavior.

bummytime avatar Jun 10 '15 00:06 bummytime

Noticing an autocorrect bug when pressing backspace on a new line with whitespace right after exiting a blockquote. (API23 Nexus 5X)

aforcier avatar Apr 12 '16 13:04 aforcier

I noticed that the last word of an image caption is duplicated if you backspace up to the caption and then start typing: https://cloudup.com/c2TqFDbohIh

Tested in Nexus 9, Android 6.0.1 (API23), app v. alpha-6. Only happens when autocorrect is enabled.

rachelmcr avatar Apr 12 '16 18:04 rachelmcr

Formatting glitches with blockquotes: https://cloudup.com/cN0k8O4nIXV (ref: PR #153 Issue #159)

Can't reproduce this one anymore, almost certainly fixed by the p -> div change.

aforcier avatar Apr 27 '16 12:04 aforcier

Re: word duplication (bullet #3 above, and Rachel's comment about image captions), all cases seem to involve:

  1. Entering text in an element that's not a div
  2. Switching (e.g. by backspace) from a div element to a non-div element

This was partially fixed in https://github.com/wordpress-mobile/WordPress-Editor-Android/pull/334, by switching from p as the paragraph separator to div (for normal paragraphs with no formatting), and with https://github.com/wordpress-mobile/WordPress-Editor-Android/pull/358 (for pasting and general blockquotes). ~~Less common cases like captions still exist, however, and have to be individually fixed.~~

aforcier avatar Apr 27 '16 12:04 aforcier

One case of autocorrect glitching occurs when exiting a blockquote, typing, and backspacing after space:

aurocorrect-bug-after-blockquote

The same also happens after lists.

aforcier avatar May 01 '16 00:05 aforcier

I'm only able to reproduce the bug above on an API23 device and an API22 emulator, - API19 and 21 emulators don't exhibit the bug.

aforcier avatar May 01 '16 01:05 aforcier

Opened a new issue for above bug and updated initial comment: https://github.com/wordpress-mobile/WordPress-Editor-Android/issues/367.

aforcier avatar May 01 '16 02:05 aforcier

Posts beginning with blockquotes on API23+ can have the blockquote stripped by autocorrect (https://github.com/wordpress-mobile/WordPress-Editor-Android/issues/385)

This was fixed in #399, updated OP.

aforcier avatar Jun 09 '16 15:06 aforcier

Words are sometimes duplicated, the full cause is still under study (an example can be seen in the blockquote glitch video)

I think all cases of this have been fixed, I haven't encountered this issue in a long while. I've updated the OP and moved it to a 'Apparently solved' group, since it's possible it might still occur in a rare edge case.

aforcier avatar Jun 09 '16 16:06 aforcier

Applying a style (e.g. bold, italics) while in the middle of typing a word (with visible suggestions) does not work (#123)

This was fixed in #427, updated OP.

aforcier avatar Jun 27 '16 14:06 aforcier

If you have a formatted word followed by a misspelled, unformatted word, the misspelled word will get the formatting from the previous word when it's autocorrected:

  1. With autocorrect enabled on your device, open the editor
  2. Tap the italics button to enable it, type a word and a space, and tap the italics button to disable it again
  3. Misspell the next word you type
  4. Add a space. Result: The word is autocorrected and gets the formatting from the previous word.

Reported originally on Moto g, WPAndroid alpha-16. Tested and confirmed on Nexus 9, Android 6.0.1, WPAndroid alpha-16. h/t Zandy for the report.

rachelmcr avatar Jul 08 '16 12:07 rachelmcr