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

[Bug]: Unable to select text inside inputs when a toast is open #550

Closed
felixmosh opened this issue Dec 20, 2020 · 9 comments · Fixed by #554, newerton/gobarber-frontend#11 or newerton/gostack-modulo07#17
Assignees
Labels
Merged in next Merged but not live

Comments

@felixmosh
Copy link

felixmosh commented Dec 20, 2020

What is the current behavior?
When the toast is open & draggable={true} it is not possible to select the text inside inputs with mouse drag.

Screen.Recording.2020-12-20.at.11.34.42.mov

Steps to reproduce:

  1. open codesandbox https://codesandbox.io/s/react-react-toastify-working-forked-bu95r
  2. write some text inside the input
  3. click to open a toast
  4. try to select the text inside of the input using mouse drag

What is the expected behavior?
It should not prevent mouse drag outside of the toast it self.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
React v17
react-toastify v6.2.0 (it is not reproduces in react-toastify 6.1.0)

@felixmosh
Copy link
Author

Why is it a normal behavior?
The draggble must apply only of the toast, not the entire page.

Think about a call center app, which shows the caller details in a toast, which always affects the entire page.

@fkhadra
Copy link
Owner

fkhadra commented Dec 20, 2020

@felixmosh fair point. It seems like a regression to me as you were not able to reproduce the issue with v6.1 . I'll look at it asap.

@felixmosh
Copy link
Author

Thanx 🙏🏼

@fkhadra fkhadra self-assigned this Dec 20, 2020
@fkhadra
Copy link
Owner

fkhadra commented Dec 20, 2020

@felixmosh, is it the expected behavior?

Screen.Recording.2020-12-20.at.10.31.04.PM.mov

@felixmosh
Copy link
Author

It can be fixed with usage of css user-select: none.

@fkhadra fkhadra added the Merged in next Merged but not live label Dec 23, 2020
@DaleyKD
Copy link

DaleyKD commented Jan 15, 2021

Seeing the tag "Merged in next", does this mean that this is fixed in the next release?

@fkhadra
Copy link
Owner

fkhadra commented Jan 15, 2021

Indeed. The PR is open I'm almost done.

@DaleyKD
Copy link

DaleyKD commented Jan 15, 2021

@fkhadra : THANK YOU! This bug came up via QA for our product, and would be great for it to be resolved before we go live. Thank you for such an awesome library.

fkhadra added a commit that referenced this issue Jan 20, 2021
fkhadra added a commit that referenced this issue Jan 24, 2021
@fkhadra fkhadra linked a pull request Jan 25, 2021 that will close this issue
fkhadra added a commit that referenced this issue Jan 25, 2021
## 💥 Breaking changes

- dependency to react-transition-group has been removed #514
- the `duration` parameter has been removed from `cssTransition`. Css animations just works now out of the box. Check the codesanbox below  
- the border-radius has been increased a bit

##  🚀 Features

- Css animation just works! 
[![View](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/react-toastify-animatecss-jxrx9?fontsize=14&hidenavigation=1&theme=dark&view=preview)

- add a way to load the CSS without a CSS loader
[![Edit react-toastify-inject-style](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/react-toastify-inject-style-qfg0l?fontsize=14&hidenavigation=1&theme=dark)
- specify swipe direction, close #512 . Thanks to @denydavy
[![Edit react-toastify-drag-y](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/react-toastify-drag-y-lh88i?fontsize=14&hidenavigation=1&theme=dark)
- bundle size reduced from ~7k to ~5k!
- remove the dependency on prop-types.

## 🐛 Bugfix

- fix #541 apply pauseOnFocusLoss on first render
- fix #538 react-dom should be a peer dep
- fix #530 change id generation
- fix #534 #483 toastId cannot be reused
- fix #511 by removing react-transition-group
- fix #550 Unable to select text inside inputs when a toast is open
- fix #555 The toast timer starts after you click on the toast
@dhebert-dev
Copy link

dhebert-dev commented Jul 13, 2022

I am experiencing this issue currently as of react-toastify: ^6.2.0. Is there a planned date or quarter when this bugfix will go live? Thanks!

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