Bug Tracker

Modify

Ticket #6546 (closed feature: worksforme)

Opened 3 years ago

Last modified 3 years ago

1.3.2 .text() function does not return result for textarea in Chrome 5, Firefox 3.6

Reported by: ericbojo Owned by:
Priority: Milestone: 1.4
Component: attributes Version: 1.3.2
Keywords: text, textarea, value, Cc: ericbojo@…
Blocking: Blocked by:

Description

Pretty simple bug. $('#textarea').text(); returns the inputted textareas text in IE8, but returns nothing in FF3.6 and Chrome 5 (beta). .val(); does what is expected, not sure if this is a bug or by design. Only tested with jQuery 1.3.2

Recommend a test case be made for this.

Attachments

test-6546.html Download (409 bytes) - added by dmethvin 3 years ago.
test case

Change History

comment:1 Changed 3 years ago by dmethvin

  • Type changed from bug to feature

The correct way to get the text inside a textarea is to use its value attribute, which .val() does. I have changed this to a feature request but it may be closed worksforme.

comment:2 Changed 3 years ago by tomasbarao

var variable = $("textarea#mytext").val(); doesn't work too! The val() method returns an empty string.

Changed 3 years ago by dmethvin

test case

comment:3 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to worksforme

Works fine.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.