question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ClipboardCopy displays multi-line text oddly in the summary section

See original GitHub issue

Describe the issue. What is the expected and unexpected behavior?

When passing text with newlines to ClipboardCopy, the summary section can render oddly, showing no whitespace between the lines. This screenshot shows the ClipboardCopy component above, along with the raw markdown source below.

Screen Shot 2021-01-12 at 2 24 14 PM

Please provide the steps to reproduce. Feel free to link CodeSandbox or another tool.

https://codesandbox.io/s/vigilant-morse-bm32m

Is this a bug or enhancement? If this issue is a bug, is this issue blocking you or is there a work-around?

I don’t really see a workaround, since the <input> element is hidden under the component, so I can’t do anything with css.

What is your product and what release version are you targeting?

RedHat Advanced Cluster Management https://github.com/IBM/kui

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
nicolethoencommented, Mar 1, 2022

I think that we’ve wrestled with some quirks with using contenteditable and screen readers in the past. We’d want to test that it’d still work if that’s the solution we wanted to try.

I don’t think that updating the parsing to use .replace constitutes a breaking change in the ways that we would normally avoid. But I would defer to @tlabaj for that.

1reaction
mcokercommented, Feb 28, 2022

@eliranmal I don’t know that one approach is better than another necessarily - as long as it addresses the underlying inconsistency between the way the content is applies as the value to the input. I suppose a structural change that handles the consistently inherently would be preferred to needing to modify the content - though I suspect there are pros and cons to each approach. I mostly work in the core repo, so I was just offering a non-JS solution.

Good question re: testing, maybe @tlabaj or @nicolethoen knows?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Multiline text field and strange output
Hi everyone,. I have a multiline text input field in a PowerApps form, connected to a list in SPO. It is also set...
Read more >
Add text with multiple line breaks and italic words to a plot in R
What's the easiest method to add multiple lines of text with several words in italics to a plot? Ideally, using only base R....
Read more >
Writing Multi-line Text - LibreOffice Help
Select all the cells where you want the text to break at the right border. In Format - Cells - Alignment, mark the...
Read more >
How To: Create multiline labels with concatenated text using ...
This article describes the steps to create multiline labels displaying the CITY, ZIPCODE, and TYPE field values using the TextFormatting.NewLine ...
Read more >
Multi-Line Padded Text - CSS-Tricks
Like when a paragraph of text breaks to the next line whenever the next word ... .padded-multi-line { display: inline; background: orange; ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found