Masked Input Plugin 1.2.1

There is now a new version of my Masked Input Plugin for jQuery.  Version 1.2.1 moves one step closer to my bigger picture for the plugin.  I had to make a few breaking changes to do so, but I feel that the end result is worth it.  This release adds a lot more polish to the 1.2 release.  Here's what we've got.

  • BREAKING CHANGE: Removed deprecated $.mask.addPlaceholder method.  Use the "$.mask.definitions['']="";" syntax instead.  I said I was going to do this on the last release and now seems just as good a time as any.
  • BREAKING CHANGE: Removed "allowPartial" option in favor of new mask syntax I'll describe below.  A discussion and code exchange with Michael Bray inspired this change.  I hate that it's a breaking change, but the new way makes a lot more sense.
  • New mask syntax option '?'.  Anything listed after '?' within the mask is considered optional user input.  The common example for this is phone number + optional extension.  The new syntax will look like this: "(999) 999-9999? x99999"
  • I got rid of the awkward input behavior where users typed over top of existing input.  The plugin acted like a word processor Insert mode.  This has always agrivated me, so now the input shifts on input and backspace/delete.
  • Now calling .change() on blur if the value has changed since the plugin prevents the change event from being fired naturally.
  • Pasting incomplete test no longer wipes the input.  Instead, the cursor is just placed where the input leaves off.
  • Fixed backspace detection for iPhone.  Plugin is now iPhone compatible.
  • Fixed pasting bug when mask starts with a literal and caret position is on the literal character.
I feel really good about this release.  I made some changes that I feel are good for the direction of the plugin.  Iif you don't like some of the changes please let me know and I'll look at adding them back in as options.  I'm trying hard not to bloat things up, but I don't want to remove features that are needed.

Masked Input Plugin 1.2

There is now a new version of my Masked Input Plugin for jQuery. After a long absence with this project, I finally decided to tackle some of the more requested features that have been sent to me. I also did some big reorganization to make room for some future enhancements. With all the changes, it seemed appropriate to bump this version from the 1.1 series.

  • Paste support for more browsers. It should now work in IE7, Firefox 3, Safari, Chrome, and Opera.
  • Fixed backspace bug in Opera.  I had originally put in special handling for Opera to get past a bug that appears to be fixed in current releases.  This code is now removed.
  • Calling .mask() with no arguments will now return the value of the input without the literals.
  • Added option "allowPartial" that will allow partial input to remain when focus is lost.
  • Exposed the hash table of the mask definitions directly to replace the $.mask.addPlaceholder() method.  The old method remains for now, but will be removed in a future relase.  You should now add custom mask definitions by "$.mask.definitions[char]=regex;"
  • Code refactoring and  house cleaning.  I made things more jQuery like and removed some crufty code in the process.  The end result is better organization to build on for future enhancements.

Masked Input Plugin 1.1.4

It's been a little while since I've pushed an update to my Masked Input Plugin for jQuery. I just released version 1.1.4 which is just a minor bugfix.

Steve Davis found and fixed a bug that would occur when the mask characters match the criteria of the first placeholder character(s). The mask characters would end up repeated as user input. Thanks to Steve for the fix!

« Previous Page