drawio-desktop icon indicating copy to clipboard operation
drawio-desktop copied to clipboard

pasting from the clipboard makes the cursor jump to beginning of the text field

Open christiansievers opened this issue 1 year ago • 2 comments

Preflight Checklist

  • [x] I agree to follow the Code of Conduct that this project adheres to.
  • [x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Describe the bug pasting from the clipboard makes the cursor jump to beginning of the text in the same field, or to the beginning of another paragraph in the text

To Reproduce Steps to reproduce the behavior:

  1. Create a text field
  2. enter some text
  3. copy some text from somewhere else. It doesn't matter if plain text or formatted text.
  4. paste the text.

Expected behavior The cursor should be at the end of the pasted text

Screenshots n/a

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

  • draw.io version v21.6.8

Desktop (please complete the following information):

  • OS: MacOS 13.4.1

Additional context this might be connected or not: sometimes when undoing the paste (for example when I forgot to paste without formatting (Shift-option-cmd-V), the entire field disappears, with no way to get it back. Its contents are then lost.

christiansievers avatar Aug 15 '23 10:08 christiansievers

Also similar to https://github.com/jgraph/drawio-desktop/issues/898

This is a very common occurrence for me as well, and very annoying.

Other things that happen:

  • Sometimes pasting text inserts the text with a new line after, and the text has the default styling and not the copied styling;
  • Sometimes pasting inserts the text on a new line with some hidden object between the previous line and the inserted text that cannot be removed, and then pressing CTRL+Z will remove the text, but insert it somewhere else or let things disappear entirely

In the second example, I think the text is pasted as-is, while the surrounding text is wrapped in divs, so pressing backspace before the just pasted text doesn't merge it with the div on the previous line or something.

ThenTech avatar Oct 23 '23 23:10 ThenTech

I think this is an Electron issue as we cannot reproduce online.

m-mohamedin avatar Dec 28 '23 19:12 m-mohamedin