vue-document-editor icon indicating copy to clipboard operation
vue-document-editor copied to clipboard

lost page when paste data from clipboard

Open DavidSun0403 opened this issue 3 years ago • 7 comments

Test in both in version 1.2.6 and 1.2.4. If the initial content is very large(more than three pages in my case). Then I paste some data from clipboard. The second page will disappear.

DavidSun0403 avatar Feb 17 '22 17:02 DavidSun0403

Hi. Thanks for reporting. I can't reproduce this behavior yet. It is maybe dependent to the web-browser you use and specific to the content you paste.

Please note this library is not yet adapted for large content, as stated in the README (see Issue 14 for more info).

However I can look at it if you provide an online playground, with the minimal initial content and the paste content which causes issues (for example you can fork this project and rebuild demo with the faulty content). Also please give me the web browser you use and its version.

motla avatar Feb 21 '22 14:02 motla

If you have a content more than two pages, stored in one data element, such as three pages content in data[0], and then paste a word from clipboard in anywhere in page 1, all content in page two will lost

DavidSun0403 avatar Jul 11 '22 13:07 DavidSun0403

I tried but I'm afraid couldn't reproduce the issue... What web browser are you using?

motla avatar Jul 30 '22 11:07 motla

Chrome with latest version. should I send a vedio screen cap to you?

DavidSun0403 avatar Aug 28 '22 10:08 DavidSun0403

Chrome: 106.0.5249.103

DavidSun0403 avatar Oct 09 '22 15:10 DavidSun0403

Sorry I tried again without success. I made a branch with a dummy example of 3-pages content. When I paste a word in the first page, I get no text loss (except a selection bug in some cases). Please clone this example:

git clone -b test-issue13 https://github.com/motla/vue-document-editor.git

Please open docs/index.html to your web-browser, paste a word from clipboard anywhere in page 1 and tell me if you get the issue you mentioned.

If not you will have to provide me a minimal playground that fails so I can find the cause (fork the project, modify Demo.vue, then npm run build and make a pull request or send me a link).

In the meantime I'm now rewriting a new core which brings out the page management completely from Vue and should address most of the reported issues. It is tricky nonetheless so I can't give you a delay.

motla avatar Oct 09 '22 15:10 motla

⬆️ Please note that the example was on Vue3 but I just tested the Vue2 branch as well and I get the same result with the same content.

motla avatar Oct 09 '22 16:10 motla

Hello! I just released v2.1.0 with a new core for Vue3 which may correct your problem. Please let me know this if you still have issues.

motla avatar Oct 30 '22 16:10 motla