Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Mask: removing the complete event

  • Loading branch information...
commit 203404cab8e7e3ab53fbac5268d26906c6ab9701 1 parent df92f8d
@gnarf gnarf authored
Showing with 0 additions and 38 deletions.
  1. +0 −34 tests/unit/mask/mask_events.js
  2. +0 −4 ui/jquery.ui.mask.js
View
34 tests/unit/mask/mask_events.js
@@ -10,40 +10,6 @@ function type( input, key ) {
input.simulate( "keypress", { charCode: code, which: code });
}
-test( "complete: Complete event fires when typing last non-optional character of mask", function() {
- expect( 2 );
- var input = $( "#mask1" ).val("").mask({
- mask: "9?9",
- complete: function( event, ui ) {
- equal( this, input[0], "Complete event fired with correct context" );
- }
- }),
- mask = input.data( "mask" );
-
- input.focus();
- mask._caret( 0 );
- type( input, "1" );
- equal( input.val(), "1_", "Value with optional character" );
-});
-
-test( "complete: Complete event fires when typing last character of mask", function() {
- expect( 3 );
- var input = $( "#mask1" ).val("").mask({
- mask: "99",
- complete: function( event, ui ) {
- equal( this, input[0], "Complete event fired with correct context" );
- }
- }),
- mask = input.data( "mask" );
-
- input.focus();
- mask._caret( 0 );
- type( input, "1" );
- equal( input.mask( "valid" ), false, "Mask is not yet valid" );
- type( input, "2" );
- equal( input.val(), "12", "Value with optional character" );
-});
-
asyncTest( "focus: Initial Caret Positioning", function() {
var input = $( "#mask1" ).val("").mask({
mask: "9",
View
4 ui/jquery.ui.mask.js
@@ -115,7 +115,6 @@ $.widget( "ui.mask", {
var bufferPosition,
bufferObject,
counter,
- wasValid = this.isValid,
bufferLength = this.buffer.length,
value = "";
@@ -139,9 +138,6 @@ $.widget( "ui.mask", {
}
}
}
- if ( this.currentEvent && !wasValid && this.isValid ) {
- this._trigger( "complete", this.currentEvent, {} );
- }
return value;
},
_events: {
Please sign in to comment.
Something went wrong with that request. Please try again.