From edf69c107423cb2f4a5926c9e4f45e98b8fcb5a6 Mon Sep 17 00:00:00 2001 From: Andrew Buss Date: Mon, 1 Jun 2015 15:51:35 -0700 Subject: [PATCH] actually disable submit button if not enough characters --- scripts/FeedController.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/FeedController.js b/scripts/FeedController.js index af66d05..09d9a82 100644 --- a/scripts/FeedController.js +++ b/scripts/FeedController.js @@ -150,8 +150,10 @@ angular.module('flashy.FeedController', ['ui.router', 'ngAnimate', 'ngWebSocket' $('#new-card-input').on('keydown', function(e) { if (e.which == 13) { e.preventDefault(); - $scope.pushCard(); - listenForC = true; + if ($scope.submit_enabled) { + $scope.pushCard(); + listenForC = true; + } return false; } else { -- 1.9.1