Skip to content

Commit 0db7f73

Browse files
committed
Merge pull request digitalBush#309 from ibcooley/master
Ensuring caret does not execute if the element does not have focus. …
2 parents 9893954 + 0d017f4 commit 0db7f73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jquery.maskedinput.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ $.fn.extend({
3434
caret: function(begin, end) {
3535
var range;
3636

37-
if (this.length === 0 || this.is(":hidden")) {
37+
if (this.length === 0 || this.is(":hidden") || this.get(0) !== document.activeElement) {
3838
return;
3939
}
4040

0 commit comments

Comments
 (0)