Skip to main content

Bug Tracker

Side navigation

#8439 closed bug (wontfix)

Opened March 03, 2011 10:26PM UTC

Closed March 03, 2011 10:39PM UTC

Last modified March 03, 2011 10:48PM UTC

$(input element).val() returns reversed string under certain conditions

Reported by: anonymous Owned by:
Priority: low Milestone:
Component: attributes Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:

(Bug occurs on Firefox 3.6.14 (but not on Opera 11.01), using Google's jQuery 1.5.1.min).

Bit of an obscure one, this.

Run the code below, and type a string. The string will be echoed to the screen reversed.

Change the font-size near the end to anything other than 0, and rerun. The string will be echoed to the screen correctly.


  <script type="text/javascript" src=""></script>
  <script type="text/javascript">
     $('#term_pass .display').text(  $('#passwordInput').val()   );  
     $('#term_pass .display').text(  $('#passwordInput').val()   );  

  <div id="term_pass">
   <span class="display"></span>

   <input style="font-size: 0px;"  type="password" id="passwordInput"/>

Why would the font-size of an input box influence the string contained within?

Not sure whether the bug is me, jQuery or Firefox.

Attachments (0)
Change History (3)

Changed March 03, 2011 10:27PM UTC by anonymous comment:1

Bugger. I didn't see the jsFiddle warning until I submitted, and now I can't edit it. Sorry.

Changed March 03, 2011 10:39PM UTC by rwaldron comment:2

component: unfiledattributes
priority: undecidedlow
resolution: → wontfix
status: newclosed


As you can see, this is not a jQuery bug

Changed March 03, 2011 10:48PM UTC by anonymous comment:3

Ah, thank you. I'll resubmit to Firefox.