Spellchecker does not properly add custom words to dictionary

Steps to reproduce

I have not been able to reliably reproduce the bug.

  1. right-click on a word not recognized by the dictionary and choose ‘add to dictionary’.

Screen Shot 2021-02-18 at 7.35.10 PM

Screen Shot 2021-02-18 at 7.35.17 PM

Expected result

The word will be added to the dictionary

Actual result

Only part of the word was added.

Two times in a row (clicking on the same word), a fragment of the word was added. The third time was a charm; the word was correctly added.

Environment

  • Operating system: MacOS 11.1
  • Obsidian version: v0.11.2

Additional information

NOTE: The only condition that stands out is this is the first word that I have ever added to the dictionary (maybe some structure was not initialized). Simply removing the .obsidian/config file and trying again did not replicate the issue, but I did not wipe all traces of Obsidian from the system.

I cannot reliably reproduce the bug, but it is certainly not a one-time issue.

Obsidian is adding the word fragments (basically the entire word without its last letter) to the dictionary and the config file.

Excerpt from the “config” json file:
"spellcheck":true,"spellcheckDictionary":["cementitious","Supportabilit","Supportabilit","Supportability"]}**%**

Screen Shot 2021-02-23 at 8.06.49 PM

In all cases I’ve seen this issue, right-clicking on the word and choosing “add to dictionary” adds the word fragment the first two times and the complete word the third time.

In my specific cases, the first time the word is added, there is no suggestion, and only a fragment of the word is actually added to the dictionary.

The second time the word is added, there is no suggestion, and the same fragment of the word is actually added to the dictionary a second time.

The third time the word is added, the previously-added word fragment IS the suggestion, and when ignoring that and choosing “add to dictionary AGAIN”, the entire word is finally added to the dictionary.