There is now a new version of my Masked Input Plugin (
http://digitalbush.com/projects/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.

Merry Christmas!
Josh
digitalbush.com

Reply via email to