r2396 - Mask: Fixed destroy method.
Author: scott.gonzalez
Date: Sat Mar 28 09:59:27 2009
New Revision: 2396
Modified:
branches/dev/mask/ui/ui.mask.js
Log:
Mask: Fixed destroy method.
Modified: branches/dev/mask/ui/ui.mask.js
==============================================================================
--- branches/dev/mask/ui/ui.mask.js (original)
+++ branches/dev/mask/ui/ui.mask.js Sat Mar 28 09:59:27 2009
@@ -14,9 +14,8 @@
*/
(function($) {
-var pasteEventName = ($.browser.msie ? 'paste' : 'input') + ".mask",
- undefined;
-
+var pasteEventName = ($.browser.msie ? 'paste' : 'input') + ".mask";
+
$.widget("ui.mask", {
_escapeMask: function(){
@@ -165,12 +164,6 @@
return false;
};
- input
- .one("unmask", function() {
- input
- .unbind(".mask")
- })
-
if (!input.attr("readonly"))
input
.bind("focus.mask", function() {
@@ -205,7 +198,9 @@
},
destroy: function() {
- return this.element.trigger("unmask");
+ this.element
+ .unbind('.mask')
+ .removeData('mask');
},
value: function() {