Allow alert words to be multi-word.

(imported from commit ccf8a387a25d079cf43ed335f6dc9debd70db75d)
This commit is contained in:
Jessica McKellar 2013-11-06 09:12:28 -05:00
parent 8dd4bf8f00
commit fdb5863687
1 changed files with 2 additions and 5 deletions

View File

@ -56,11 +56,8 @@ $(function () {
$('#word-alerts').on('keypress', '.edit-alert-word', function (event) {
var key = event.which;
// Disallow spaces (key code 32)
// Handle enter as "add"
if (key === 32) {
event.preventDefault();
} else if (key === 13) {
// Handle enter (13) as "add".
if (key === 13) {
event.preventDefault();
var word = $(event.target).val();