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.

[Alert] html content breaks up text in Alert

See original GitHub issue
  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

The content in the Alert component breaks into several lines when html tags are present in the content. For example: <em>, <i>, <strong>

Screen Shot 2020-03-07 at 11 45 09 PM

Expected Behavior 🤔

The presence of html content should not cause line breaks. Specifically when using html tags aimed at formatting text.

Steps to Reproduce 🕹

import Alert from '@material-ui/lab/Alert'

<Alert severity="warning" icon={false}>You are going to transfer ownership of <strong>Demo Team</strong> to another user, and you will be given Administrator access.</Alert>

Demo: https://codesandbox.io/s/funny-sun-kxmym

Tech Version
Material-UI v4.9.5
Material-UI Lab v4.0.0-alpha.45
React 16.8
Browser Chrome v80

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
oliviertassinaricommented, Apr 9, 2020

@developerKumar Feel free to go ahead.

1reaction
kmhigashiokacommented, Apr 4, 2020

Is this up for PR?

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Alert] html content breaks up text in Alert #20023 - GitHub
The presence of html content should not cause line breaks. Specifically when using html tags aimed at formatting text. Steps to Reproduce.
Read more >
New line in JavaScript alert box - Stack Overflow
I saw some people had trouble with this in MVC, so... a simple way to pass '\n' using the Model, and in my...
Read more >
How to Line Breaks to JavaScript Alert? - Tutorialspoint
To add line breaks to JavaScript alert, use “\r ”. In the following example, we will see how to display text in JavaScript...
Read more >
Removing Extra Line Breaks in HTML alerts - Forum
I was able to make it work by removing all whitespace from the code.. works, but not easy to edit later.. <html><head><style type="text...
Read more >
How to add a new line in the alert box ? - GeeksforGeeks
To add a new line to the content of alert box we are going to use \n backslash(n). Example-1: This example adds \n...
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