mastodon / mastodon-ios

Official iOS app for Mastodon
https://app.joinmastodon.org/ios
GNU General Public License v3.0
2.09k stars 269 forks source link

[BUG] Text cursor is invisible in dark mode #1100

Open aeveltstra opened 1 year ago

aeveltstra commented 1 year ago

Is there an existing issue for this?

Current Behavior

When using the app in dark mode on iOS, it's difficult to almost impossible to edit words we've written: the text cursor is nearly invisible. I don't know where the cursor is placed. I can move it, but can't see where it lands. Thus I wind up editing the wrong word or letter. This forces me to retype the whole post, or switch to light mode. Both get annoying real fast.

Expected Behavior

I expect to see the cursor. Maybe it can switch colors in response to the app switching from light to dark theme. Maybe the iOS provides a default color for such situations, that can be used? I want to be able to spot where the cursor lands, so I can edit my texts.

Steps To Reproduce

  1. Using the latest Mastodon app for iOS.
  2. Switch visual theme to dark mode. It does not matter whether by hand or following the system's theme.
  3. Be sure to use an active account on an active instance.
  4. Create a text post. Write some words.
  5. Double-tap a word: cannot see the selection. Single-tap in front of a different word: cannot see the cursor. Long press the space bar to move the cursor: cannot see the cursor.

Environment

- Device: iPhone 13 mini
- OS: iOS
- Version: 16.5.1(c)
- Build: 20F75
- Mastodon: v2023.11 (337)

Anything else?

No response

zeitschlag commented 1 year ago

Hello @aeveltstra, I tried to reproduce this issue, but I think, I did something wrong? The cursor was visible in Dark Mode, as you can see here:

https://github.com/mastodon/mastodon-ios/assets/2580019/e00ed9ac-4df8-478b-85e2-d79f741656ca

Could you please add more information, like a short video, so that we can see, what you did there? Thanks a lot!

thadguidry commented 1 year ago

Cannot reproduce with dark mode chosen in iOS settings and default Accessibility settings and Mastodon app in Automatic setting.

iOS 16.6 iPhone SE

image

aeveltstra commented 1 year ago

Thank you for those examples! They definitely differ from my experience. Please see this screen recording:

https://github.com/mastodon/mastodon-ios/assets/1955292/b97ad1bf-c132-4ce5-9da4-39543a4a5c46

thadguidry commented 1 year ago

Try this as an override.

To change the cursor color on your iPhone, you need to1: Go to Settings > Accessibility. Inside Accessibility, tap on Pointer Control > Color. Inside color, choose the color you want. The options are White, Blue, Red, Green, Yellow, Orange.

aeveltstra commented 1 year ago

Try this as an override.

To change the cursor color on your iPhone, you need to1: Go to Settings > Accessibility. Inside Accessibility, tap on Pointer Control > Color. Inside color, choose the color you want. The options are White, Blue, Red, Green, Yellow, Orange.

My iPhone doesn't give Pointer Control as an accessibility option. iPhone 13, iOS 16.6.

I also added Mastodon as a separate dedicated accessbility options app: also does not give Pointer Control.

aeveltstra commented 1 year ago

Cause found!

The problem happens when my iOS is turned to light mode, while the Mastodon client is set to dark mode. The client uses its own dark background colors, but also the iOS default cursor color, which conflicts in this situation.

The Reddit iOS client doesn't: it has its own cursor color catered to its own background colors.

Solution: either all colors custom or none custom: mixes and matches cause accessibility issues.

zeitschlag commented 1 year ago

@aeveltstra Thank you for these detailed hints:

Cause found!

The problem happens when my iOS is turned to light mode, while the Mastodon client is set to dark mode. The client uses its own dark background colors, but also the iOS default cursor color, which conflicts in this situation.

Using the 2023.15-release I followed your steps but wasn't able to reproduce the bug. The cursor always had the expected color. We added some theme-related code (see #1121) and might have fixed this issue by accident?

May I ask you to confirm that on your device? Thanks in advance!

TS6ix2GaH3q679h5 commented 3 months ago

Cause found!

The problem happens when my iOS is turned to light mode, while the Mastodon client is set to dark mode. The client uses its own dark background colors, but also the iOS default cursor color, which conflicts in this situation.

The Reddit iOS client doesn't: it has its own cursor color catered to its own background colors.

Solution: either all colors custom or none custom: mixes and matches cause accessibility issues.

I can verify this. I am still experiencing the exact same issue.

Currently: Sept 2024 iOS app version: v2024.8 (6769) iOS version: 17.6.1

I was just about to report it when I found this thread. As this user says, my cursor and text selection were essentially invisible (black on an extremely dark gray background), but strangely only sometimes. Strange no more: thanks to this comment I realized that this was only happening during the hours when the phone was in daytime (“Light”) mode.

Mastodon app Dark mode, iPhone Light mode:

image

Mastodon app Dark mode, iPhone Dark mode:

image

I guess for now I can set the phone’s OS to dark mode permanently but it would be nice if the app could override that since I keep the app in Dark Mode always but I like the system switching automatically.

Thanks!