typora / typora-issues

Bugs, suggestions or free discussions about the minimal markdown editor — Typora
https://typora.io
1.53k stars 58 forks source link

Cursor on MacOS does not respect NSTextInsertionPointBlinkPeriodOn/Off #3990

Open dmattera opened 3 years ago

dmattera commented 3 years ago

OS version: MacOS 10.15.7 (Catalina) Typora version: 0.9.9.35.2 (4715)

Steps to reproduce:

  1. Set defaults write -g NSTextInsertionPointBlinkPeriodOn -float 99999 and defaults write -g NSTextInsertionPointBlinkPeriodOff -float 1
  2. This more or less disables the cursor blinking globally in all situations where a text cursor is used on MacOS by making it so the cursor "blinks" so slowly that it's not noticable.
  3. Quit/Reopen Typora to find the cursor continues to blink the same as before
abnerlee commented 3 years ago

Seems an upstream bug of Webkit/Safari. The caret in <input> in safari also does not respect this setting.

Or have you try reboot the mac?

dmattera commented 3 years ago

Rebooting did not make a difference, unfortunately.

It may also be related to Electron if you are using version < 5.0.11: https://github.com/electron/electron/issues/10668

For what it's worth, I am able to at least work around it for now using the following in base.user.css:

.CodeMirror-cursors {
    visibility: unset !important;
}

although it only applies to the cursor in source code mode.

dmitriydligach commented 2 weeks ago

This is still a problem for me. Is there a solution or a workaround? Thanks!