Skip to content

The IDE you know, rebuilt in Rust. IntelliJ IDEA–style keymap, tool windows and search-everywhere in a fast native app: editor, code insight, debugger, Git, terminal, database and HTTP clients for 60+ languages.

fix(ui): keep the arrow cursor on scrollbars (#1191)

ppxba36354462568
diff --git a/src/editor/core/cm/theme.ts b/src/editor/core/cm/theme.ts
index 82ce7accd..bc4ad7dbe 100644
--- a/src/editor/core/cm/theme.ts
+++ b/src/editor/core/cm/theme.ts
@@ -83,8 +83,7 @@ export const openideaTheme = EditorView.theme({
},
"&.cm-focused": { outline: "none" },
".cm-scroller": {
- // The workbench body uses the arrow cursor; the text area gets the I-beam (also past the last line).
- cursor: "text",
+ // The scroll container keeps the arrow cursor so its scrollbar does not turn into the I-beam.
fontFamily: "var(--openidea-editor-font, var(--font-mono))",
fontWeight: "var(--fw-code, 400)",
fontSize: "var(--openidea-editor-font-size, var(--fs-code))",
@@ -95,6 +94,7 @@ export const openideaTheme = EditorView.theme({
".cm-content": {
padding: "4px 0 8px 0",
caretColor: "var(--caret, var(--fg-strong))",
+ cursor: "text",
},
".cm-line": { padding: "0 16px 0 6px" },
...caretStyles,
diff --git a/src/features/build/Build.module.css b/src/features/build/Build.module.css
index 708d9504a..a6a6c6fe3 100644
--- a/src/features/build/Build.module.css
+++ b/src/features/build/Build.module.css
@@ -81,7 +81,7 @@
color: var(--fg);
background: var(--bg-app);
-webkit-user-select: text;
- cursor: text;
+ cursor: default;
-webkit-user-select: text;
user-select: text;
outline: none;
@@ -91,6 +91,7 @@
position: relative;
width: 100%;
min-width: max-content;
+ cursor: text;
}
.line {
position: absolute;
diff --git a/src/features/database/Database.module.css b/src/features/database/Database.module.css
index d620be9ea..f256361cf 100644
--- a/src/features/database/Database.module.css
+++ b/src/features/database/Database.module.css
@@ -534,11 +534,12 @@
background: var(--bg-editor);
-webkit-user-select: text;
user-select: text;
- cursor: text;
+ cursor: default;
}
.outputLine {
white-space: pre-wrap;
word-break: break-word;
+ cursor: text;
}
.outputTime {
color: var(--link);
diff --git a/src/features/debugger/ui/DebugToolWindow.module.css b/src/features/debugger/ui/DebugToolWindow.module.css
index a5e878be5..386c36cd0 100644
--- a/src/features/debugger/ui/DebugToolWindow.module.css
+++ b/src/features/debugger/ui/DebugToolWindow.module.css
@@ -238,7 +238,7 @@
white-space: pre-wrap;
word-break: break-word;
-webkit-user-select: text;
- cursor: text;
+ cursor: default;
-webkit-user-select: text;
user-select: text;
outline: none;
@@ -248,6 +248,7 @@
.consoleInner {
position: relative;
width: 100%;
+ cursor: text;
}
.out {
diff --git a/src/features/run/Run.module.css b/src/features/run/Run.module.css
index 677ba9c6b..996755666 100644
--- a/src/features/run/Run.module.css
+++ b/src/features/run/Run.module.css
@@ -102,7 +102,7 @@
background: var(--bg-app);
-webkit-user-select: text;
user-select: text;
- cursor: text;
+ cursor: default;
outline: none;
contain: strict;
}
@@ -110,6 +110,7 @@
position: relative;
width: 100%;
min-width: max-content;
+ cursor: text;
}
.wrap .consoleInner {
min-width: 0;
diff --git a/src/features/services/Services.module.css b/src/features/services/Services.module.css
index daad831f6..98d0e9fae 100644
--- a/src/features/services/Services.module.css
+++ b/src/features/services/Services.module.css
@@ -128,6 +128,9 @@
white-space: pre;
-webkit-user-select: text;
user-select: text;
+ cursor: default;
+}
+.log > div {
cursor: text;
}
.wrap {
diff --git a/src/features/vcs/GitLog.module.css b/src/features/vcs/GitLog.module.css
index 8f5cdc946..781401394 100644
--- a/src/features/vcs/GitLog.module.css
+++ b/src/features/vcs/GitLog.module.css
@@ -414,7 +414,7 @@
font-size: var(--fs-small);
line-height: 18px;
-webkit-user-select: text;
- cursor: text;
+ cursor: default;
-webkit-user-select: text;
user-select: text;
}
@@ -422,6 +422,7 @@
white-space: pre-wrap;
word-break: break-all;
color: var(--fg-secondary);
+ cursor: text;
}
.line-cmd {
color: var(--fg-emphasis);
diff --git a/src/ui/SourcePreview.module.css b/src/ui/SourcePreview.module.css
index 93d2e7b19..82a2b95e7 100644
--- a/src/ui/SourcePreview.module.css
+++ b/src/ui/SourcePreview.module.css
@@ -14,7 +14,7 @@
/* The workbench disables selection globally; preview text stays selectable/copyable. */
-webkit-user-select: text;
user-select: text;
- cursor: text;
+ cursor: default;
}
.empty {
display: flex;
@@ -28,6 +28,7 @@
padding: 4px 0;
font: inherit;
min-width: max-content;
+ cursor: text;
}
.codeLine {
display: flex;