Browse Source

Merge pull request #781 from fquiroz01/patch-1

Allow Copy Ctrl+C in read only input mask
Robin Herbots 11 years ago
parent
commit
29c235f4b4
1 changed files with 2 additions and 2 deletions
  1. 2 2
      js/jquery.inputmask.js

+ 2 - 2
js/jquery.inputmask.js

@@ -1175,7 +1175,7 @@
                                 var handler = eventHandler.handler;
                                 eventHandler.handler = function (e) {
                                     //console.log("triggered " + e.type);
-                                    if (this.readOnly || this.disabled)
+                                    if (this.disabled || (this.readOnly && !(e.type == "keydown" && e.ctrlKey && e.keyCode == 67)))
                                         e.preventDefault();
                                     else {
                                         switch (e.type) {
@@ -2161,4 +2161,4 @@
         };
     }
     return $.fn.inputmask;
-})(jQuery);
+})(jQuery);