jgraph / drawio-desktop

Official electron build of draw.io
https://www.diagrams.net
Apache License 2.0
49.63k stars 4.95k forks source link

Cannot wrap text after copy and paste text #1013

Open 6zhenyu opened 2 years ago

6zhenyu commented 2 years ago

Preflight Checklist

You must agree to search and the code of conduct. You must fill in this entire template. If you delete part/all or miss parts out your issue will be closed.

Describe the bug When I copy and paste text in Draw.io (using Ctrl+C, Ctrl+V), sometimes the pasted texp will appear in the next line, and I cannot use Delete key or Backspace key to make it come back to the previous line. If I use Delete at the end of the previous line, the pasted text will be deleted, but it stays at the next line. If I use Backspace at the start of the next line, nothing will happen. I have recorded a video to illustrate this issue, please see attached. (In this video, I was trying to copy a "theta" and move it back to the previous line.)

To Reproduce Steps to reproduce the behavior:

  1. Copy any text in the shape
  2. Paste it in the shape
  3. See error

I have found that this error only appears when there is "div /div" in this shape. But I don't understand what I did make these codes appear in some shapes. As a PhD students, I always type some complex equations or symbols, including superscripts and subscripts. Maybe these codes are related to these operations? Thus, I also find a solution for me: delete these codes, as shown in attached video.

Expected behavior As mentioned before.

Screenshots See attached.

https://user-images.githubusercontent.com/105188992/169917592-a0373d22-a7db-4cea-a83f-e637ce05c17a.mp4

draw.io version (In the Help->About menu of the draw.io editor):

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. See the FAQ for more information.

craigrs84 commented 1 year ago

this is very frustating please fix

SlimePuppyRR commented 9 months ago

I also have this issue

SlimePuppyRR commented 9 months ago

I also noticed it happens after the text in the object is a certain lenght (not sure how long, I can troubleshoot later). and my pasted material contained some special characters and subscript formating (°,L(in subscript),→,≠)

erictioh commented 3 months ago

i have similar problem too, the way to reproduce is to copy styled text from somewhere like ms word and paste into the rect box in drawio, then i will notice i hit backspace and the text wont erase then the issue is reproduced.

not really everytime copy of text will get this prob, but im not really sure why.

and when my diagram has this prob, and i export it out as svg, the svg read out by python lxml and tostring, after that the svg string once embeded into html will cause the html after this diagram truncated due to the extra div i guess.