nylas-mail icon indicating copy to clipboard operation
nylas-mail copied to clipboard

paste kills unfinished addresses in composer

Open grinich opened this issue 10 years ago • 2 comments

try this:

  1. copy: google.com
  2. go to the composer and type joe@
  3. use CMD+V to paste

what do you get? image image


This should just append it so it looks like this:

image

and then enter or tab tokenizes it properly

image

grinich avatar Jun 10 '16 04:06 grinich

I think i have come up with a fix for this (see pull request #2635).

This solves the problem more-or-less as suggested above. Pasted text is just appended to already existing text. If after pasting, the input field now looks like an email address, it will automatically be converted to a button like the last picture above (no need to press space, tab or enter). If after pasting, the input field does not look like a full address then it will remain as just text waiting for further input.

I believe this is the behaviour that most people would want and expect. There is the issue that if you wanted to send an email to '[email protected]' but for some reason only copied 'email.com' to the clipboard before typing 'test@' then hitting paste, you would have to do a couple of extra steps to add the '.au' bit but that seems an unlikely scenario. It is easy enough to modify to suit this use case but I think immediate tokenization is better the majority of the time.

jathpala avatar Jul 18 '16 13:07 jathpala

Hey! We've pushed an update (0.4.47) that should fix this issue—let us know if you see it again! Thanks!

jackiehluo avatar Jul 28 '16 23:07 jackiehluo