Closed Bug 376879 Opened 17 years ago Closed 17 years ago

input type=text default value truncated when in positioned element

Categories

(Core :: Layout, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 325486

People

(Reporter: kma, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

Default text in a input tag is truncated to "the length of any text in the parent element" when placed in a positioned element in a table. 
The cursor is also hidden. If you enter some char all text become visible.
see example code in additional information


Reproducible: Always

Steps to Reproduce:
1. Save example code to a page
2. View in firefox, you should the text is truncated
3. Add / remeove chars in "Some text"
4. Reload page / View again. Go figure.

Actual Results:  
Input default text is truncated

Expected Results:  
all text visible from start

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>input bug</title>

<style type="text/css">

#edit
{
  top: 0px;
  left: 0px;
  position: relative;
}

#edit div
{
  top: 20px;
  left: 0px;
  white-space: nowrap;
  position: absolute;
}
</style>

</head>
<body>

<table>
  <tr>
    <td>
      <div id="edit">
      Some text here...
      <div>
        <input type="text" name="bug" size="100"
               value="this is cropped at length of 'some text here...'" />
      </div>
      </div>
    </td>
  </tr>  
</table>

</body>
</html>
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
This works fine on trunk.
No need for the table, if you set a width on your div#edit, it will truncate the text in the textfield.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.