Saturday, April 30, 2016

OS X Spellchecker Bug

Dear Mr Apple,
I've found what appears to be a minor bug in El Cap's spelling autocorrection mechanism, however your feedback mechanism doesn't allow for enough characters to describe it. Here it is instead.

Summary

When the text insertion cursor is placed in a string of letters at a position in the string such that the letters to the left of the cursor constitute what spellcheck considers to be a misspelled but correctable word, it will not give the user warning. However, if a space is then inserted, the correction will be made, unannounced.

Tech Details


  • OS: OS X El Capitan Version 10.11.4
  • H/W: MacBook Pro (Retina, 15-inch Mid 2015)


Example

Here is a common use case in which this behavior represents a bug. Suppose the user wants to modify the following phrase:

FROM:
To change your password, use the change-password command
TO:
To change your password, use the passwd command
Two possible methods for doing that are as follows:

Method #1

  1. Place the text insert cursor just after the "d" at the end of "change-password"
  2. Backspace 15 characters leftwards across all of "change-password"
  3. Type out the 6 characters of “passwd"
  4. The surrounding text is now “passwd| command” (with the “|” character showing the location of the text insertion cursor). The spellchecker is about to correct “passwd” to “passed" and so the user is provided with a visual warning to give them a chance to block that correction
  5. The user hits ESC to block change:

Method #2

  1. Place the text insert point just before the “c” at the start of “command"
  2. Backspace 16 characters leftwards across all of "change-password "
  3. Type out the 6 characters of “passwd"
  4. At this point, the surrounding text is “passwd|command” (with the “|” character showing the location of the text insertion cursor). However, although, as before, the spellchecker is about to correct “passwd” to “passed”, no visual warning is given to the user
  5. The user inserts the final space after “passwd” and the spellchecker makes the change. Then, typically:
  6. The user backspaces three characters from after the just-inserted space, from “…passed “ to “…pass”, before re-typing “wd“ in an attempt to correct the problem
  7. Again, the spellchecker gives no warning after “wd” is inserted
  8. Repeat from step 5 until frustration sets in
The lack of visual warning in Method #2 step 4 is a bug.

Finally

Fellow users, if the above bothers you as it does me, turning off autocorrection completely can be done in System Preferences->Keyboard->Text by unchecking the Correct spelling automatically box.
To turn off autocorrection more selectively, for selected applications,  see here.
--