Browse Source

Merge branch 'ajacome-patch-1' into 3.x

Robin Herbots 11 years ago
parent
commit
7e20586222
1 changed files with 2 additions and 2 deletions
  1. 2 2
      js/jquery.inputmask.js

+ 2 - 2
js/jquery.inputmask.js

@@ -754,7 +754,7 @@
 
                     npt.scrollLeft = npt.scrollWidth;
                     if (opts.insertMode == false && begin == end) end++; //set visualization for insert/overwrite mode
-                    if (npt.setSelectionRange) {
+                    if (npt.setSelectionRange &&  $(npt).is(":focus") == true) { 
                         npt.selectionStart = begin;
                         npt.selectionEnd = end;
 
@@ -1445,7 +1445,7 @@
 
                     npt.scrollLeft = npt.scrollWidth;
                     if (opts.insertMode == false && begin == end) end++; //set visualization for insert/overwrite mode
-                    if (npt.setSelectionRange) {
+                    if (npt.setSelectionRange &&  $(npt).is(":focus") == true) { 
                         npt.selectionStart = begin;
                         npt.selectionEnd = end;