ivaynberg/select2 — pull request #2838 by RustyToms (2014-12-02 06:59:11+00:00)
Title: don't display a hidden input on destroy

closes #2837

Here is a JSFiddle using select2.js as it is now: http://jsfiddle.net/hdt12xeL/1/
It will appear to be fine in Chrome, but if you click the update button in Firefox the styling will change.

This is the same JSFiddle, except using the code in this PR: http://jsfiddle.net/hdt12xeL/2/
It will work in both Chrome and Firefox.

The change is in the `destroy` method. A hidden input is detected, and modifications that are only relevant to visible elements are not performed on the hidden input, so the browser will not attempt to display this element using inline styling.