From 2bdea2fbbb8cce55462cae554b85c8d275ccb0a1 Mon Sep 17 00:00:00 2001 From: Giovane Date: Tue, 27 Oct 2015 11:37:46 -0200 Subject: Remove email parsing on space keydown #505 --- web-ui/app/js/mail_view/ui/recipients/recipients_input.js | 3 +-- .../spec/mail_view/ui/recipients/recipients_input.spec.js | 15 --------------- 2 files changed, 1 insertion(+), 17 deletions(-) (limited to 'web-ui') diff --git a/web-ui/app/js/mail_view/ui/recipients/recipients_input.js b/web-ui/app/js/mail_view/ui/recipients/recipients_input.js index 2c3a4604..7cbdad39 100644 --- a/web-ui/app/js/mail_view/ui/recipients/recipients_input.js +++ b/web-ui/app/js/mail_view/ui/recipients/recipients_input.js @@ -33,8 +33,7 @@ define([ 186: 'semicolon', 188: 'comma', 13: 'enter', - 27: 'esc', - 32: 'space' + 27: 'esc' }, EVENT_FOR = { 8: events.ui.recipients.deleteLast, diff --git a/web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js b/web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js index c0b3d22f..6fdf9711 100644 --- a/web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js +++ b/web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js @@ -87,21 +87,6 @@ describeComponent('mail_view/ui/recipients/recipients_input',function () { expect(addressEnteredEvent).not.toHaveBeenTriggeredOnAndWith(this, { name: 'to', address: ''}); }); }); - - describe('when space is pressed', function () { - it('should tokenize email address', function () { - var addressEnteredEvent = spyOnEvent(this.$node, Pixelated.events.ui.recipients.entered); - - var spaceKeyPressEvent = $.Event('keydown', { which: 32}); - spyOn(spaceKeyPressEvent, 'preventDefault'); - - this.$node.val('a@b.c'); - this.$node.trigger(spaceKeyPressEvent); - - expect(spaceKeyPressEvent.preventDefault).toHaveBeenCalled(); - expect(addressEnteredEvent).toHaveBeenTriggeredOnAndWith(this, { name: 'to', address: 'a@b.c' }); - }); - }); }); describe('on keyup', function () { -- cgit v1.2.3