Spelling and Grammar doesn't underline typos

Hello,

I used to use Scrivener years ago, and recently I’ve bought an upgraded license and started using the latest version. I’m running Scrivener 3.2.3 on macOS 12.3, on Apple Silicon, and I think it’s great.

However, I’ve noticed that spell checking is very unreliable. I’m referring to the “Spelling and Grammar” OS functionality on macOS, which many applications share. Scrivener’s menu commands (edit > Spelling and Grammar) seems similar to the ones on many other applications, so I assume it’s using the same OS APIs. (see comparison screenshots below [1]) In all applications, the “Spelling and Grammar” settings are set to “Automatic by Language”.

And yet, spell checking doesn’t work on Scrivener, or it only does for some words. For example, earlier I noticed that I mistyped “people” and “peple”, and Scrivener did not underline it in red. For context, my internet browser underlines “peple” in red in the very text-editing area where I’m composing this message, and in my experiments with other apps they all successfully underline typos that Scrivener simply ignores. As a matter of fact, when I come across an undetected typo in Scrivener I usually verify it with macOS’ TextEdit, and the latter always flags the typos flawlessly.

Examples of other words that the spell checker is happy to ignore, even though they’ll be correctly flagged in other applications: “abou”, “typ”, “comparis”, “hav”, “yees”. Most seem to be incomplete words, as if whatever module is responsible to determine if a word is mistyped is holding off judgement until I’m done typing, except that it doesn’t notice that the word is complete and the cursor has moved on (i.e. there is a space, a comma, a quote mark, etc).

Very plainly, sometimes it works, sometimes it doesn’t. At some point I thought that Scrivener uses a more permissive dictionary, somehow, even though I understand that spell checking is a OS feature. I’ve dismissed this hypothesis because sometimes I can get it to recognise an unflagged word as a typo. For example, now if I type “yees” it gets underlined in red.

All of this happens as I type normally, not when I paste text or do something weird, although I’ve also tried to paste text to see if it changed anything (it didn’t).

Something even more odd is that if I also enable the grammar checks (in addition to spelling), it starts flagging the ignored words as grammar errors, with a green underline instead of red [2]. However, if I mouse-hover genuine grammar errors some contextual text will appear explaining the issue [3], but this doesn’t happen with the typos underlined in green.

It’s just very confusing, and unreliable. I feel like in order to be sure that I’ve not made any typos I have to copy and paste all my Scrivener documents into TextEdit just to double check. It’s not a great user experience.

Am I doing something wrong?

PS: I’ve tried to search the forum for similar issues, but I’ve only found very old ones. A more recent one never got the problem resolved.


I have screenshots, but I’m finding it impossible to add them to the post. The post editor allows me to add them to the draft like any other Discourse forum I’ve used in the past, but then it tells me that’s forbidden when I click to create the post. I’ve uploaded the screenshots on imgur and added links, but that also fails because it tells me that I can’t add links to the post. I supposed that these are restrictions because I’m a new user. I like a challenge so I’ve also tried to add <img> tags with the base64 data of the images, but that fails with a 500 (I guess that the post ends up being too long). Adding the links as code seems to be the only thing that works.
[1]
Scrivener’s Edit > Spelling and Grammar menu: https://i.imgur.com/uaflayI.png
TextEdit’s Edit > Spelling and Grammar menu: https://imgur.com/PkkO9CH.png
[2] https://imgur.com/E3NMF5D.png
[3] https://imgur.com/MxYBPXa.png

1 Like

You may want to move to something more robust. See the discussion on this page Grammarly and other tools

Thank you, but that’s not really a solution to my problem.

Also, there have been documented concerns with Grammarly’s privacy policy and their handling of user content, so I would avoid using it on principle.

Other solutions were mentioned, not just Grammarly.

What concerns are those? That would be worrying. :unamused:

The concerns stem from the fact that what you type gets sent to their servers in order to be parsed and analyzed, which is required for their tools and integration to provide their suggestions. If you google it, you’ll find articles and analyses.

While that’s interesting, I would really like to keep this thread on topic please. This is a request for support on something that looks like an issue with Scrivener itself (either I’m doing something wrong, or it’s a bug). I wouldn’t want to add noise to the conversation by talking about third party integrations that I don’t plan to use anyhow.

Thank you for that.

To be on topic, I recently ran spell checker in Scrivener and I had no problems.

1 Like

Same here. No problems.

1 Like

No issues here either. Perhaps try resetting Scrivener’s Preferences? That can fix a whole bunch of problems. Resetting Preferences / macOS: Troubleshooting / Knowledge Base - Literature and Latte Support

Definitely weird that it works okay in TextEdit and not Scrivener, because yes, Scrivener uses the spell-checking and grammar-checking functionality provided by macOS. Both applications should be displaying the same behaviour.

When was the last time you rebooted your system? macOS does strange things if it has been up too long. Whenever I notice weird behavior I find that a reboot almost always solves the problem.

Not quite true, since Scrivener has additional settings.

Yes, this does happen. I see it most days.

I think it has something to do with the change Keith made to remove the grammar-checking that Apple introduced into spell-checking. The change was made because Apple’s “suggestions” are wrong 90% of the time.

I do not know what triggers the problem, though I have suspicions.

I never use the grammar-checker.

ime, you can kickstart things by putting a space after the incorrect word. Also, if you move to another document and then return, any incorrect words will be marked – this is clearly easier than cut and pasting into another app.

Thank you everyone for your replies.

Some more info on your suggestions:

  1. The problem persists across system restarts. I’ve just restarted again to be sure, and I can confirm that rebooting the mac doesn’t affect the problem.
  2. Same for resetting the Scrivener preferences. I basically use the defaults, and resetting them doesn’t seem to have any effect.
  3. I don’t normally use the grammar checker (green underlines) either. I only really want to use the spell checker (red underline), and that’s my normal setup. In one of my previous messages I mentioned enabling the grammar checker only as a weird workaround.

@auxbuss yes, I’ve also experienced that sometimes placing the cursor next to an unflagged typo and adding a space is enough to kickstart the spell checking for that word. Alas, this seems to only work in some specific situations. From what I can see, this trick works for situations where I click to place the cursor in the middle of a sentence, then I introduce a typo, and then I click somewhere else without ever adding a space after the misspelled word. Going back to the typo and adding a space after it fixes the problem in that case. The same is true for the trick of switching back and forth between documents. Both only work when the type checker would normally recognize the typo, but simply hadn’t been triggered yet. This is also a bug IMO, but at least I can verify that the same happens in TextEdit, so I assume it’s just an annoying quirk of macOS’s spellchecker.

But even ignoring that, there are other typos that Scrivener just won’t detect for me. No matter how many times I switch between documents or add and remove spaces.

In this screenshot you can see some typos in Scrivener and TextEdit. I typed them word by word in both apps. Then tried to copy and paste them. Tried to add and remove spaces, etc. Always with the same result.

It was mentioned that Keith changed something in this area of the app. Is there a proper way to escalate this topic to get his attention, or to file a bug report?

I’m reading *** BUG REPORTING: Please read before posting! ***. Should I re-post this under bug?

Anyway, detailed reproduction steps:

  1. Create a new Scrivener project. I used the “General Non-Fiction” one.
  2. Open the Scrivener project. Ensure that under the Edit > Spelling and Grammar menu the Check Spelling While Typing option is enabled. In my test, I’ve left the other options disabled.
  3. Go to any empty document. I used the pre-created one under Manuscript > Chapter > Section.
  4. Type these exact words: How iss this even posible, preccious?
  5. Expectation: the words “iss”, “posible” and “preccious” will be underlined in red as typos.
  6. What actually happens: “preccious” is underlined in red, but the rest of the sentence is not.
  7. Repeat this in a new TextEdit document: the typos will be highlighted as expected.

I can confirm. It’s exactly as you say.

That’s on an M1 Mac Mini with Monterey 12.3.1 and Scrivener 3.2.3.

Thanks for the report. This is down to some workaround code Scrivener has in place. In macOS Mojave, Apple made a rather silly change in the spell-checker system, making it so that it would underline words such as “of”, “then” and “were” because it thought (erroneously) that you meant “off”, “than” or “where” (even when grammar-checking was turned off - these would be treated as misspellings). So I have some code that checks anything flagged as a misspelling by the OS in isolation, to make sure it is an actual misspelling. But bizarrely Apple’s shared spell checker is telling my code that “iss” and “posible” are legitimate spellings when taken in isolation!

The easiest fix is just to remove my workaround code if the original problem no longer exists - I’ve tested some text in TextEdit and it seems that words such as “of” and “were” are no longer mistakenly underlined. If anyone else can trigger the grammar-related red underlines in TextEdit or Pages, though, please let me know, as that will necessitate a more complicated workaround.

All the best,
Keith

3 Likes

Thank you for taking a look.

But bizarrely Apple’s shared spell checker is telling my code that “iss” and “posible” are legitimate spellings when taken in isolation!

The easiest fix is just to remove my workaround code if the original problem no longer exists - I’ve tested some text in TextEdit and it seems that words such as “of” and “were” are no longer mistakenly underlined.

I see. Thanks for the context. It’d be interesting to see if this is only a problem on Monterey, or if it’s also happening on previous macOS versions.

I’ve repeated my reproduction steps on macOS Catalina 10.15.7.
There, too, Scrivener fails to underline the typos but TextEdit seems to work fine.

I might have come across one of these cases, where the text system is incorrectly flagging a valid word as a typo.

That screenshot was taken using the same reproduction steps from my previous post, with different text.

TextEdit was configured to “Check Spelling While Typing”, but not grammar. Enabling the grammar check didn’t change the result.

Scrivener was configured to check both spelling and grammar. That’s just the workaround I described in a previous message in this thread, as usually the grammar check (green underline) will flag typos missed by Scrivener’s spelling checker. If I disable Scrivener’s grammar checker (therefore configuring it like TextEdit), then it doesn’t underline “there” at all.

If I mouse-hover the green-underlined “there” in Scrivener, the tooltip suggestion is the same at the one from TextEdit (screenshot).

I’ve verified this on both macOS 12.3.1 (Apple Silicon) and 10.15.7 (Intel).

Same here in TextEdit, macOS 12.3.1.

I don’t see a way to turn off grammar checking in Preferences.