jQuery MessageBox 2.2.0
Added filters before deferred handlers
24 January 2017
A feature some users might have missed until now is the possibility to execute some kind of check on the user’s input before actually executing the
Version 2.2.0 makes up for that, as well as adding a couple of nice new features and fixes.
What’s new in version 2.2.0
Brand new options
filterFail have been added. You can pass some functions to be executed before the deferred is resolved or rejected, optionally keeping the deferred in pending state and preventing the execution of the handlers. See Filters for the detailed documentation.
filterFail function you can return a string representing an error message that will be displayed to the user. See Example 6.
"password" can now be trimmed auotmatically before passing the values to the deferred handlers. See custom inputs configuration for details.
Default keycodes for buttonDone
When only a single
buttonDone is displayed and
buttonFail is disabled, the Escape key (keyCode
27)* will also trigger the
Minor CSS fix
margin-bottom for buttons (moved away from buttons parent padding) in the default CSS file. Now large buttons will stack one over the other nicely if the MessageBox width isn’t enough to contain them on one line.
Minor code fix
The focus was being removed from an existing MessageBox input if another MessageBox was created and queued while the former one was displayed. This kind of corner case is now fixed.
Download and documentation
Go to the Lab page: MessageBox