Closed
Bug 178500
Opened 22 years ago
Closed 22 years ago
Option Javascript object truncates whitespaces in text field
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: mcosta, Assigned: jst)
Details
When you create a Option javascript object on the client side with text and value as parameters to the constructor, the value of the text property is striped of whitespaces and reduced to just one whitespace character. for example: On the clientside javascript //create Option Object with text and value as parameters to the constructor. Option option = new Option("some text with whitespace characters","someval"); //this alert will display "some text with whitespace characters" alert(option.text); extra whitespaces have been ignored. Could you please provide a solution to this. I have tried Unicode escape sequences as well as a css entry such as <style type="text/css"> option p{ white-space:pre;} </style> but nothing seems to work. Thanks in advance for your help Malory
Comment 1•22 years ago
|
||
Browser, not engine ---> DOM Level 0 This is an adjunct or duplicate of bug 30471, "Leading spaces not displayed when adding Options to Select box"
Assignee: rogerl → jst
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → DOM Level 0
Ever confirmed: true
QA Contact: pschwartau → desale
Comment 2•22 years ago
|
||
cc'ing jkeiser, peterv Should we resummarize bug 30471 to include whitespace stripped anywhere in the Option, not just leading whitespace? If so, this bug is a straight duplicate.
Comment 3•22 years ago
|
||
It's a straight duplicate no matter what... resummarizing may be a good idea. *** This bug has been marked as a duplicate of 30471 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•