Skip to main content

Bug Tracker

Side navigation

#6546 closed feature (worksforme)

Opened May 07, 2010 05:05PM UTC

Closed June 16, 2010 02:27AM UTC

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@gmail.com
Blocked by: Blocking:
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 (1)
  • test-6546.html (0.4 KB) - added by dmethvin June 16, 2010 02:26AM UTC.

    test case

Change History (3)

Changed May 07, 2010 05:10PM UTC by dmethvin comment:1

type: bugfeature

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.

Changed May 09, 2010 10:31AM UTC by tomasbarao comment:2

var variable = $("textarea#mytext").val();

doesn't work too!

The val() method returns an empty string.

Changed June 16, 2010 02:27AM UTC by dmethvin comment:3

resolution: → worksforme
status: newclosed

Works fine.