-
-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Mac only] Hair cursor color should be white when using a dark theme. #2743
Comments
Doesn't OS X make sure mouse cursors are visible on all types of backgrounds? If so, maybe we should simply remove the hair cursor feature again (I believe it was contributed by Adobe)? |
@marijnh It sounds like you might be referring to the crosshair that appears when you hold down Alt? That wasn't contributed by Adobe, but also this bug is about something different -- Raymond is referring to the regular "I beam" mouse cursor that appears any time you mouse over CodeMirror or any other text field. It does look like this is a Mac OS problem. Windows uses an XOR cursor for this, but Mac seems to use a fixed-color cursor that is hard to see on dark gray backgrounds. I can see the same problem with a plain textarea: http://jsfiddle.net/Qz7F2/ Judging by forum threads like this -- https://discussions.apple.com/message/17250405#17250405 -- it sounds like this is a fact of life on OS X, and the only solution is to supply a custom mouse cursor for widgets that you know have a dark background. (Which, according to the thread, TextMate and Sublime do already). It looks like CSS |
If you can create a reasonably tiny image url, we can just put it into codemirror.css, and have the dark themes use it. Although, actually, that might be one of those things that are a pain to do with CSS -- the themes can't force an extra class, and so the style would have to be associated with the themes' classes by including it in every single theme file. Maybe, though I am not fond of such hacks, use computedStyle to measure the background color, and add a 'cm-dark-theme' class based on that? |
We are still waiting for the "I beam" cursor to become visible in dark themes. There is a very pale shadow outline, but that is definitely not enough. We would really like a white "I beam" cursor. Any progress on this? |
Are you talking about the regular 'text' cursor when you say 'i beam'? Is that one also hard to spot on dark backgrounds on Macs? (Wasn't this company supposed to be good at design?) |
[Pointlessly abusive comment removed] |
@arrbie Please see the links I posted above. This is a limitation of Mac OS -- every app that wants to not have this problem needs to supply its own solution. Chrome didn't do that extra work to fix this; that's not CodeMirror's fault or Brackets's fault. Though we could put in extra effort to work around it, every text field on the web would need the same workaround so it seems much more sensible for Chrome or the OS itself to fix this. That said, it looks like OS X 10.10 or a recent version of Chrome has actually fixed this, since I don't see this bug anymore either Brackets, CodeMirror, or my simple JSFiddle link above. |
Result: You can barely see the cursor since it is blended into the background color.
The text was updated successfully, but these errors were encountered: