MacOS – Writing a backtick (`) followed by enter produces another backtick in Sierra

internationalizationkeyboardmacos

I've noticed that since I switched to Sierra (currently on 10.12.1) whenever I write a backtick followed by enter (or shift+enter), in many programs I get another backtick. This didn't happen in El Capitan.

I first noticed this in the Slack native app, where I could enter a code block by surrounding some lines with triple backticks, like

```
some code

```

But apparently the same happens in e.g. Chrome. As I wrote the example above, typing three backticks and pressing enter gave me four backticks instead of jumping to the next line. But if I do the same thing in Safari, it works like it used to in El Capitan.

I believe the Slack app was done using MacGap, i.e. it uses OSX's WebView, so the issue might have something to do with that as well. Then again, MacGap takes advantage of WebKit and thus I guess the problem should also occur in Safari (and perhaps not Chrome), if it trails back to WebKit.

I use a Scandinavian keyboard with the input source defined as Finnish. It seems to also contribute to the problem, as I can't reproduce it if I switch to US input source.

Does anyone know of a way to fix this – other than switching to a US input source?

Best Answer

A colleague of mine contacted Slack about this and their response was:

We are aware of a related bug within Chrome and, as our newest app is closely linked with Chrome, it is unfortunately also affecting us in Slack. In this case, it's not something we can directly fix ourselves, but we've escalated it to the relevant parties.

So I guess this is not really directly linked to Sierra as is. But I'll leave the question here in case someone runs into the same problem.

And if you know a fix or a nice workaround, I'll be happy to hear it.

(So far the best I know of is pressing space after entering the backticks which isn't that bad. It still adds a key press to my usual flow but life just isn't always perfect. :) )