mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-11 04:07:55 +03:00
Empty check checkValidity null protection
Useful when used against contenteditable divs to avoid exceptions
This commit is contained in:
parent
c83d857a26
commit
dc9a327a3a
|
@ -111,7 +111,7 @@
|
|||
})
|
||||
.on("keyup change", ".form-control", function() {
|
||||
var $this = $(this);
|
||||
if($this.val() === "" && $this[0].checkValidity()) {
|
||||
if ($this.val() === "" && (typeof $this[0].checkValidity != "undefined" && $this[0].checkValidity())) {
|
||||
$this.addClass("empty");
|
||||
} else {
|
||||
$this.removeClass("empty");
|
||||
|
|
Loading…
Reference in New Issue
Block a user