Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pasting into a participant field now preserves any text already there (Issue #2410) #2635

Merged
merged 1 commit into from
Jul 18, 2016
Merged

Pasting into a participant field now preserves any text already there (Issue #2410) #2635

merged 1 commit into from
Jul 18, 2016

Conversation

jathpala
Copy link
Contributor

This modifies the behavious when pasting into the to, cc or bcc fields of a new draft. This allows you to, for example, copy the domain of the email address from the clipboard and type the addressee and then paste the domain. Any text already in the input field is not automatically deleted. Rather the pasted
text is added to the already existing text. If the new contents of the email field now matches as an email address (based on RegExpUtils.emailRegex().test()), then the address is immediately tokenized. If the new input text doesn't match as an email, just append the new text and wait for further input.

… (Issue #2410)

This modifies the behavious when pasting into the to, cc or bcc fields of a new draft.
Any text already in the input field is not automatically deleted. Rather the pasted
text is added to the already existing text. If the new contents of the email field now
matches as an email address (based on RegExpUtils.emailRegex().test()), then the address
is immediately tokenized. If the new input text doesn't match as an email, just append
the new text and wait for further input.
@bengotow
Copy link
Contributor

Hey! Thanks for contributing this. Long term, we're looking to clean email address specific logic out of TokenizingTextField (and move it to the subclass ParticipantsTextField) but it looks like there's already another reference to the email regex in _onInputChanged, so this doesn't make the situation any worse!

I believe there's a GitHub issue for this too, will see if I can find it and reference this PR. Cheers—

@bengotow bengotow merged commit 1392887 into nylas:master Jul 18, 2016
@bengotow
Copy link
Contributor

Marking #2410 as done-pending-release!

@grinich
Copy link
Contributor

grinich commented Jul 18, 2016

59ktq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants