Browse Source

Add drag drop functionality

Robin Herbots 13 years ago
parent
commit
887166241b
1 changed files with 5 additions and 5 deletions
  1. 5 5
      js/jquery.inputmask.js

+ 5 - 5
js/jquery.inputmask.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2012 Robin Herbots
 * Copyright (c) 2010 - 2012 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 1.0.22a
+* Version: 1.0.23
 */
 */
 
 
 (function ($) {
 (function ($) {
@@ -171,12 +171,12 @@
 
 
             //helper functions
             //helper functions
             function isInputEventSupported(eventName) {
             function isInputEventSupported(eventName) {
-                var el = document.createElement('input'), 
+                var el = document.createElement('input'),
 		  eventName = 'on' + eventName,
 		  eventName = 'on' + eventName,
 		  isSupported = (eventName in el);
 		  isSupported = (eventName in el);
                 if (!isSupported) {
                 if (!isSupported) {
-                  el.setAttribute(eventName, 'return;');
-                  isSupported = typeof el[eventName] == 'function';
+                    el.setAttribute(eventName, 'return;');
+                    isSupported = typeof el[eventName] == 'function';
                 }
                 }
                 el = null;
                 el = null;
                 return isSupported;
                 return isSupported;
@@ -651,7 +651,7 @@
                 }).bind("keydown.inputmask", keydownEvent
                 }).bind("keydown.inputmask", keydownEvent
                 ).bind("keypress.inputmask", keypressEvent
                 ).bind("keypress.inputmask", keypressEvent
                 ).bind("keyup.inputmask", keyupEvent
                 ).bind("keyup.inputmask", keyupEvent
-                ).bind(pasteEvent + ".inputmask", function () {
+                ).bind(pasteEvent + ".inputmask, dragdrop.inputmask, drop.inputmask", function () {
                     var input = this;
                     var input = this;
                     setTimeout(function () {
                     setTimeout(function () {
                         caret(input, checkVal(input, buffer, true));
                         caret(input, checkVal(input, buffer, true));