File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 393
393
jMask . options = options ;
394
394
jMask . remove = function ( ) {
395
395
var caret = p . getCaret ( ) ;
396
+ if ( jMask . options . placeholder ) {
397
+ el . removeAttr ( 'placeholder' ) ;
398
+ }
396
399
p . destroyEvents ( ) ;
397
400
p . val ( jMask . getCleanVal ( ) ) ;
398
401
p . setCaret ( caret ) ;
Original file line number Diff line number Diff line change @@ -326,11 +326,12 @@ $(document).ready(function(){
326
326
module ( 'Removing mask' ) ;
327
327
328
328
test ( "when I get the unmasked value" , function ( ) {
329
- testfield . mask ( '(00) 0000-0000' ) ;
329
+ testfield . mask ( '(00) 0000-0000' , { placeholder : '(__) ____-____' } ) ;
330
330
331
- equal ( typeTest ( "1299999999" ) , "(12) 9999-9999" ) ;
331
+ equal ( typeTest ( "1299999999" ) , "(12) 9999-9999" ) ;
332
332
testfield . unmask ( )
333
- equal ( testfield . val ( ) , "1299999999" ) ;
333
+ equal ( testfield . val ( ) , "1299999999" ) ;
334
+ equal ( testfield . attr ( 'placeholder' ) , undefined ) ;
334
335
} ) ;
335
336
336
337
module ( 'Getting Unmasked Value' ) ;
You can’t perform that action at this time.
0 commit comments