Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toast close button doesn't show for very wide toasts #861

Closed
MasterOdin opened this issue Oct 24, 2022 · 0 comments
Closed

Toast close button doesn't show for very wide toasts #861

MasterOdin opened this issue Oct 24, 2022 · 0 comments
Labels
bug Merged in next Merged but not live

Comments

@MasterOdin
Copy link

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

If a toast shows text that has words that stretch the toast div, then the close button will end up being pushed outside the clickable space.

If showing a toast that has a lot of text

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your CodeSandbox (https://codesandbox.io/s/new) example below:

https://codesandbox.io/s/exciting-sanne-pwv8pw?file=/App.js

What is the expected behavior?

The close button should ideally always show, even if the content is quite large.

I've found that adding the rule fixes this:

.Toastify__toast-body {
  max-width: 95%;
}

Though, the text may overflow the body, it'll at least show the close button.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

This affects React 16+, and have tested in macOS chrome / firefox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Merged in next Merged but not live
Projects
None yet
Development

No branches or pull requests

2 participants