From 366d0e1400001193f7e2de82ee4e06319f128b5b Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Tue, 5 Dec 2017 10:06:10 -0500 Subject: [PATCH] Fix more registration form bugs. --- lms/static/js/student_account/views/RegisterView.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lms/static/js/student_account/views/RegisterView.js b/lms/static/js/student_account/views/RegisterView.js index c243fa72e7..e4a03151d5 100644 --- a/lms/static/js/student_account/views/RegisterView.js +++ b/lms/static/js/student_account/views/RegisterView.js @@ -161,6 +161,7 @@ postRender: function() { var inputs = this.$('.form-field'), + inputSelectors = 'input, select, textarea', inputTipSelectors = ['tip error', 'tip tip-input'], inputTipSelectorsHidden = ['tip error hidden', 'tip tip-input hidden'], onInputFocus = function() { @@ -177,7 +178,7 @@ }, onInputFocusOut = function() { // If input has no text apply focus out styles - if ($(this).val().length === 0) { + if ($(this).find(inputSelectors).val().length === 0) { $(this).find('label').addClass('focus-out') .removeClass('focus-in'); } @@ -191,7 +192,7 @@ }, handleInputBehavior = function(input) { // Initially put label in input - if (input.val().length === 0) { + if (input.find(inputSelectors).val().length === 0) { input.find('label').addClass('focus-out') .removeClass('focus-in'); }