Dot being added when pressing space repeatedly

This can be reproduced in the online demos.

  1. Go to the editor at https://codemirror.net/6/
  2. place cursor directly after a character.
  3. press SPACE a couple of times. When pressing slow, all is fine, when pressing fast, the dot is inserted.

It seems to be language independent as the same happens in https://nextjournal.github.io/clojure-mode/

I am on a Mac M1 . Safari + Chrome both exhibit the same behaviour.

Thanks

I am trying a few things to see if i can pinpoint where the issue is.

  1. editor + state + no extensions . Still happening.
  2. editor + state + no extensions + empty content. Still happening.
  3. editor with no config. Also still happening.

Does your browser behave differently in a regular contenteditable element?

Actually it does, so this must be due to my mac settings.

However, my older editor running codemirror 5.47.0 doesn’t add the dot. I guess codemirror 5 is not based on contentEditable.

Just upgraded my mac and didnt know about this feature…

Apologies for the noise :frowning:

Hi there, just had the same issue, here is a link to an article showing how to disable this behavior on macOS : How to Stop Typing Periods Automatically with Double-Space on MacOS

The patch below detects this behavior and replaces it with a regular space insertion.