We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf95587 commit 9f6cbf3Copy full SHA for 9f6cbf3
1 file changed
scripts/material.js
@@ -31,14 +31,14 @@ $(function (){
31
});
32
33
$(document).on("keyup change", ".form-control", function() {
34
- if ($(this).val() !== "") {
35
- $(this).removeClass("empty");
36
- } else {
37
- $(this).addClass("empty");
38
- }
39
- });
40
- $(document).on("keydown change", ".form-control", function() {
41
+ var self = $(this);
+ setTimeout(function() {
+ if (self.val() === "") {
+ self.addClass("empty");
+ } else {
+ self.removeClass("empty");
+ }
+ }, 1);
42
43
$(document)
44
.on("focus", ".form-control-wrapper.fileinput", function() {
0 commit comments