don't display a hidden input on destroy#2838
Conversation
There was a problem hiding this comment.
This will remove the inline "display" styling from the hidden input.
|
@kevin-brown if you merge this PR, could you tag a new release? We use bower, and I won't really be able to deploy this fix and a previous drop-above styling fix that I submitted a couple of weeks ago that has an impact on our app until a release is tagged. |
don't display a hidden input on destroy
|
Looks good. I can't guarantee when the next 3.x release will be, as the 4.0 release is coming up soon. You won't need to use the hidden input in 4.0. |
|
Thanks @kevin-brown! Yea I saw the 4.0 branch, looks cool. Just a new patch version would be really helpful though, something to put in our bower.json file, a 3.5.3. Because 3.5.2 is breaking for us in Firefox. |
|
Oh, I see you have a 3.5.3 milestone. I'm not familiar with that technique yet. Ok sorry, I don't want to intrude on your processes. |
closes #2837
Here is a JSFiddle using select2.js as it is now: http://jsfiddle.net/ckvbwrcp/
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/ckvbwrcp/1/
It will work in both Chrome and Firefox.
The change is in the
destroymethod. 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.