Skip to content

Copy text does not create newlines between div elements #7315

@rhdunn

Description

@rhdunn

Summary

When I try to copy text from a cgit diff view in Ladybird, the newlines are not preserved.

Operating system

Linux

Steps to reproduce

  1. Go to a cgit based diff view, e.g. https://git.zx2c4.com/cgit/diff/
  2. Select some of the lines of text
  3. Copy the text (Ctrl+C)
  4. Open a text editor, e.g. kate
  5. Paste the text (Ctrl+V)

Expected behavior

The text should be formatted with newlines.

Actual behavior

The text has no newlines.

Notes:

  1. The expected behaviour is observed in Firefox.
  2. Newlines are created on other pages, e.g. from the readme -- https://git.zx2c4.com/cgit/about/
  3. On the diff view the lines are divs; on the about view the lines are ol/li. I've not tested other cases, e.g. p elements.

URL for a reduced test case

https://git.zx2c4.com/cgit/diff/

HTML/SVG/etc. source for a reduced test case

<div>lorem</div>
<div>ipsum</div>
<div>dolor</div>

Log output and (if possible) backtrace

n/a

Screenshots or screen recordings

No response

Build flags or config settings

No response

Contribute a patch?

  • I’ll contribute a patch for this myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghas reproWe have a way to reproduce this bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions