FIXED: Uniform JS empty SELECT bug

Uniform is a jQuery plugin that customizes the look of html form elements. Definition from the Uniform author:

Uniform masks your standard form controls with custom themed controls. It works in sync with your real form elements to ensure accessibility and compatibility.

Download it from http://uniformjs.com

If you have an empty dropdown element (that is – a SELECT without OPTION), Uniform will result in an unhandled exception: “args[0] is null”

The fault is at line 173 of uniform.js. The offending line is:

spanTag.html(selected.html());

To fix it, simply replace it with:

spanTag.html(selected.html() + '');
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s