Ticket #3941 (closed bug: wontfix)
jQuery 1.3.0 and current SVN pack versions $('select').val() returns undefined (minified version is OK)
| Reported by: | beat | Owned by: | |
|---|---|---|---|
| Priority: | critical | Milestone: | 1.3.2 |
| Component: | core | Version: | 1.3.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
The packed version val() method seems broken. Following code (with "select" and with "#mysel" selectors works fine in packed and in minified versions, but not in packed version of 1.3.0-release and 1.3.1-pre versions (today's from SVN).
minimal code to reproduce bug:
<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns=" http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript" src=" http://localhost/jquery-1.3.0/jquery.pack.js"></script> <script type="text/javascript"><!-- jQuery.noConflict(); --></script>
<script type="text/javascript"><!--
jQuery(document).ready(function($){
alert($('select').val());
}); --></script> </head> <body>
<form>
<select name="mysel" id="mysel" class="inputbox">
<option value="A" selected="selected">choice A</option> <option value="B">choice B</option>
</select>
</form>
</body> </html>
It looks like either packer is broken, OR there is a missing ";" or something else somewhere.
VERY interestingly, packing with variable shrinking the SVN jquery-1.3.1-pre using this online tool: http://dean.edwards.name/packer/
produces a working packed version.
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

The produced packed version is only 100 bytes bigger than the one produced by jQuer'y "make" packer used, but at least works.