Image keep loading, image paste twice with react-quill
Opened this issue · 1 comments
minhtri06ltr commented
Hi everyone, currently I am facing a problem with our library; it seems that all the images haven't finished uploading yet
I using react-quill: 2.0.0 and latest version of quill-image-uploader
Let's take the official demo as the bug reproduction: CodeSandbox
First problem:
- If the image hasn't finished uploading, then if I press the enter key, the image will keep showing loading forever
![image](https://private-user-images.githubusercontent.com/79675694/315968398-bf5b301b-c338-4fba-9292-9089ac06221a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3MDAxMTQsIm5iZiI6MTcyMTY5OTgxNCwicGF0aCI6Ii83OTY3NTY5NC8zMTU5NjgzOTgtYmY1YjMwMWItYzMzOC00ZmJhLTkyOTItOTA4OWFjMDYyMjFhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIzVDAxNTY1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ2M2EwM2U4MzEzNTg0MDA0YzI3NjdkN2U5MzIwZTYyNmZkODk4MmQxOWM2OWIxMTk1NmI4YWE1OGYxNTdkYWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.flZL12A7VOdQY1POHPLll2MaaMwrmSh_5fiFtmiTJ_c)
Second problem:
If the image hasn't finished uploading, and then I press a random key, for example, 'abc', the image will be duplicated: one will have the URL returned from the server, and the other will be in base64 format
![image](https://private-user-images.githubusercontent.com/79675694/315970569-4ec3cf36-00c8-4741-9070-8cdb124224b6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3MDAxMTQsIm5iZiI6MTcyMTY5OTgxNCwicGF0aCI6Ii83OTY3NTY5NC8zMTU5NzA1NjktNGVjM2NmMzYtMDBjOC00NzQxLTkwNzAtOGNkYjEyNDIyNGI2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIzVDAxNTY1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc2ZGRjYTRjZmM5MDJhNDk0YjJjZDM5ODJhNTc2ZTYyODE5NTZkOTc5NDVjOTY2OGU4NjgxYmJlMTM0ZDFmZGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.bGr-YmxnDH54W0ZxIZ-96deDBl5Lg2bQOZItUUb-noQ)
Has anyone encountered the same issue and found a solution they can share with me? It would be very helpful
john-patterson-crane commented