[Bug]: Invisible text cursor in light theme on Windows desktop app (OS dark mode conflict)
Author: therealkaban9Created Sep 24, 2026Updated Sep 24, 2026
LabelsBug Report/Open
Before you file a bug report
- I have checked the issue tracker and have not found an issue that matches the one I'm filing.
- This issue is not a troubleshooting question. Troubleshooting questions go here: https://forum.mattermost.com/c/trouble-shoot/16.
- This issue is not a feature request. You can request features and make product suggestions here: https://mattermost.uservoice.com/forums/306457-general/.
- This issue reproduces on one of the currently supported server versions.
- I have read the contribution guidelines and the Mattermost Handbook Contribution Guidelines.
Mattermost Server Version
11.10
Operating System
Windows
Steps to reproduce
- Set Windows OS to Dark Mode (Settings → Personalization → Colors → Choose your mode → Dark).
- Open the Mattermost Desktop App (theme syncing disabled — default).
- Switch Mattermost to Light Theme (Settings → Display → Theme → Denim or any light theme).
- Open any channel.
- Click in the message compose box and start typing.
- Observe: no visible text cursor in the input area.
- Click and drag to select text — the I-beam mouse cursor also disappears when hovering over the unselected (white) portion of the compose box
Expected behavior
The text caret (blinking cursor) and I-beam mouse cursor are clearly visible in the message compose box regardless of the OS color scheme, because Mattermost is using a light theme with a white background.
Observed behavior
In the light Mattermost theme, both the text caret and the I-beam mouse cursor appear white and are invisible against the white compose area background. The issue does not occur in the dark Mattermost theme. The issue does not occur in the browser (only in the desktop app). The cursor becomes briefly visible when text is selected (blue highlight provides contrast), but disappears again when moving into unselected white areas.
Log Output
Additional Information
bug research by @claude:
Root Cause
The Mattermost Desktop App sets nativeTheme.themeSource = 'system'
(themeManager.ts:182) when Theme Syncing is disabled (the default).
On Windows with OS Dark Mode active, Electron/Chromium inherits the dark
color scheme and renders native UI elements — including the text caret
and I-beam cursor — in WHITE.
Since the Mattermost light theme uses a white compose area
(--center-channel-color-bg: #ffffff), both the caret and cursor
become invisible (white-on-white).
The dark theme is unaffected because its compose area is dark,
so a white cursor is visible. The browser is unaffected because it
is not an Electron app and does not inherit nativeTheme.
Proposed Fixes (in order of preference)
Fix 1 — webapp (utils.tsx, applyTheme function):
Explicitly set color-scheme on <html> when applying a Mattermost theme,
so Chromium always picks the correct cursor/caret color:
const isLight = isLightColor(theme.centerChannelBg || '#ffffff');
document.documentElement.style.colorScheme = isLight ? 'light' : 'dark';
Fix 2 — webapp CSS (wysiwyg_editor.scss and _post.scss):
Explicitly set caret-color for all input areas so the text caret
is always the theme's text color regardless of color-scheme:
.WysiwygEditor .ProseMirror {
caret-color: var(--center-channel-color);
}
.app__body .custom-textarea {
caret-color: var(--center-channel-color);
}
Fix 3 — desktop app (themeManager.ts):
Extend the existing nativeTheme.themeSource sync logic
(currently only runs when Config.themeSyncing is true) to also run
when theme syncing is disabled, so Electron always reflects the
actual Mattermost theme brightness.
Fix 1 is the most complete: it fixes both the caret and the I-beam
cursor and works for all custom themes. Fix 2 addresses only the caret
but is a safe, minimal change. Fix 3 addresses the I-beam cursor
at the Electron level.
Environment
- Mattermost version: 11.10.0
- Desktop app: affected (Electron, Windows)
- Browser: not affected
- Mobile: not affected
- OS requirement to reproduce: Windows in Dark Mode Source: mattermost/mattermost