Closed
Bug 369586
Opened 19 years ago
Closed 19 years ago
Firefox 2.0 removes whitespace in input values
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 243709
People
(Reporter: dhanushkp, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1
My code :
<script language="JavaScript">
function display(obj)
{
alert(obj.value + " is the value");
}
</script>
<input id="test" value="0 " type="text" onClick="javascript:display(this)">
Issue : The "test" text box value is zero and two tabs. When I click on the text box, it should display "0 is the value", but it is displaying "0 is the value". The Firefox 2.0 removes the right side whitespace. It is working fine in Firefox 1.5 and IE6.
Please let me know how to fix this issue.
Thanks in advance.
Reproducible: Always
Steps to Reproduce:
1.Create a html file using the code and run it in Firefox 2.0
2.Click on the text box
3.It displays "0 is the value", instead of "0 is the value" (0 with two tabs)
Actual Results:
Alert Message displays "0 is the value" (0 with out two tabs)
Expected Results:
Alert Message should display "0 is the value" (0 with two tabs)
The whitespaces in input value should not be removed.
Comment 1•19 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070206 Minefield/3.0a3pre
I'm experiencing the opposite: In Firefox 1.5 there are no spaces but I do see them in Firefox 2.0. You're not confusing browsers?
Screenshot: http://img405.imageshack.us/img405/7503/valuesk3.png
Hi Ria,
Thank you for your reply.
The value that I am trying to display is having two tabs. The Tab space is not getting displayed in Firefox version 2.0. In other browsers (Firefox 1.5 and IE6), it is working fine.
While copy pasting the code, please remove the space next to "0" and press tab twice to reproduce the issue.
Thanks.
Hi Ria,
Thank you for your reply.
The value that I am trying to display is having two tabs. The Tab space is
not getting displayed in Firefox version 2.0. In other browsers (Firefox 1.5
and IE6), it is working fine.
While copy pasting the code, please remove the space next to "0" and press
tab twice to reproduce the issue.
Thanks.
Comment 4•19 years ago
|
||
I'm afraid I don't understand the problem so I can't help you further.
One thing is sure: Firefox -> General are definitely not the right product and component for this bug.
The right product is Core and here you can see a list of components for Core: https://bugzilla.mozilla.org/describecomponents.cgi?product=Core
If you know the right component first change the product in the select box to Core and click Commit.
Then change the product to the right one. The right people then will read your bug.
Hi Ria,
This is similar to the Bug 243709. But in that they haven't mentioned how they solved it.
The JSP writes the aboue html code and the input value is separated by the two Tabs (<%="0\t\t"%>). When the tab is in the right side of the input value then it does not work fine. The Tab spaces are removed by the Firefox 2.0. It works fine in Firefox 1.5.
Thanks.
Version: unspecified → 2.0 Branch
Component: General → String
Product: Firefox → Core
Version: 2.0 Branch → psm2.0
Updated•19 years ago
|
Component: String → General
Product: Core → Firefox
Version: psm2.0 → 2.0 Branch
Comment 6•19 years ago
|
||
See http://www.w3.org/TR/html401/types.html#h-6.2 - the value of an <input type="text"> is CDATA, so all newlines and tabs are supposed to be collapsed to single spaces. You're trying to make it do something it's not supposed to do.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•