"Copy" button on code block overlaps with content

Steps to reproduce

  1. In a note, write a code block such as this one.
cmd 1>/dev/null       # Silence stdout
  1. Enter reading mode.

Expected result

I expect to see the code block “Copy” button not overlapping the text in the code block.

Actual result

I see this.

Environment

  • Operating system: Android 12/One UI 4.1
  • Debug info:

SYSTEM INFO:
Operating system: android 12 (samsung SM-G973F)
Obsidian version: 1.4.0 (80)
API version: v1.0.0
Login status: not logged in
Live preview: off
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 2
Restricted mode: off
Plugins installed: 10
Plugins enabled: 0

RECOMMENDATIONS:
Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.

this happens on desktop too.

This was bugging me too — I “fixed” it with some CSS:

.markdown-rendered button.copy-code-button:not(:hover) {
  background-color: var(--background-secondary-alt);
  opacity: 0.9;
  filter: brightness(80%);
}
1 Like

Steps to reproduce

  1. Add a code block with a long line without spaces (93 characters, for example)
  2. Switch to Reading
  3. Hover over the code block

Expected result

Content is displayed fine.

Actual result

The copy button (very handy) is over the contents, making it hard/impossible to read. It also removes the visual cue of the copy button. (Appearing)

Environment

  • Operating system: macOS
    SYSTEM INFO:
    Obsidian version: v1.0.3
    Installer version: v0.15.9
    Operating system: Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000 22.1.0
    Login status: not logged in
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 0
    Restricted mode: on

RECOMMENDATIONS:
none


Additional information

Reproduced in sandbox.

No have solution