Skip to content

Stop Console error command links flickering on hover - #19636

Merged
gtritchie merged 4 commits into
mainfrom
bugfix/console-error-command-hover-flicker
Nov 16, 2026
Merged

gtritchie merged 4 commits into
mainfrom
bugfix/console-error-command-hover-flicker

Conversation

@gtritchie

@gtritchie gtritchie commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Addresses #10086.

Moving the mouse between the "Show Traceback" and "Rerun with Debug" links on a Console error made them flicker.

Two things combined to cause it:

  • The commands container uses line-height: 80%, so the links' text hit areas overlapped by about 1px.
  • The links are dimmed with opacity: 0.5 and go to opacity: 1 on hover. An element with opacity below 1 is painted, and hit-tested, in a layer above normal inline content. On the overlap, the hovered link dropped below the other one, which then took the hover, and the two kept swapping.

Changes to .errorCommandText:

  • display: inline-block; line-height: normal keeps each link's hit area within its own row, so a click on the bottom edge of "Show Traceback" no longer reruns the command. The text keeps its baseline alignment with the icons, and the rows are about 1.5px further apart.
  • position: relative keeps both links in the same paint layer whatever their opacity. Without it, a fraction-of-a-pixel band where the two boxes meet can still swap.

Verified manually: no flicker, and the icons line up with the text, in RStudio Desktop and on a dev server in Chrome, Safari, and Firefox.

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

RStudio E2E - all platforms

All tests passed!

#################### 100% pass rate

Passed Failed Skipped Flaky
5677 0 256 2
Platform ✅ Passed ❌ Failed ⚠️ Skipped 🔁 Flaky
✅ auth-teardown 4 0 16 0
✅ desktop-linux 1424 0 46 0
✅ desktop-macos 1419 0 51 1
✅ desktop-windows 1418 0 57 1
✅ server-linux 1364 0 54 0
✅ setup 48 0 32 0

View report online


All platforms - commit 0887dfe7571bfcc0a7f187de8e7e8f79c61c26ea - Run #2298

/* Opacity below 1 lifts an element into its own paint layer; positioning keeps
both links in that layer on hover, so where their boxes overlap the topmost
one doesn't flip with each hover change and flicker. */
position: relative;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes which link paints on top, but not why the links overlap. The overlap comes from line-height: 80% on .consoleErrorCommands (line 21), and it's still there, so the roughly 1px strip where the links overlap now always goes to the later link, "Rerun with Debug".

As a result, pointing at the bottom edge of "Show Traceback" highlights "Rerun with Debug", and a click there reruns the command with debug instead of toggling the traceback. The click handler (ConsoleError.java:111-120) acts on whichever element was hit.

The fix also depends on how browsers stack opacity and positioned elements, which a later style change could quietly undo. Removing the overlap would fix the cause, for example by giving each link row its own line-height instead of 80% on the container. Then neither position: relative nor the comment is needed.

@gtritchie
gtritchie merged commit ab12bcb into main Nov 16, 2026
1 of 7 checks passed
@gtritchie
gtritchie deleted the bugfix/console-error-command-hover-flicker branch November 16, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant