Closed Bug 59909 Opened 25 years ago Closed 22 years ago

Value doesn't redraw in <INPUT type=text> if it has exact width of element

Categories

(Core :: Layout: Form Controls, defect, P3)

x86
All
defect

Tracking

()

RESOLVED WORKSFORME
Future

People

(Reporter: c, Assigned: kinmoz)

References

Details

(Keywords: helpwanted, testcase)

Attachments

(1 file)

If the value of an <INPUT type=text> has exactly the width of the content area it won't be redrawn any more if the value is changed with JS/DOM. Testcase: <HTML> <STYLE> #input1 { width: 17px; font: 12px Courier } #input2 { width: 18px; font: 12px Courier } #input3 { width: 19px; font: 12px Courier } #inputX { font: 12px Courier } </STYLE> <SCRIPT> function Set() { var date= new Date(); document.getElementById( "input1" ).value= date.getSeconds(); document.getElementById( "input2" ).value= date.getSeconds(); document.getElementById( "input3" ).value= date.getSeconds(); document.getElementById( "inputX" ).value= document.getElementById( "input2" ).value; } </SCRIPT> <BODY onload="setInterval( Set, 1000 );"> <FORM> <INPUT id=input1 type=text> <INPUT id=input2 type=text> <INPUT id=input3 type=text> <INPUT id=inputX type=text> </FORM> </HTML> Note that the value is still set, but will never be shown again, even if the width changes (seconds 0..9 in the testcase). Maybe you'll have to adjust the exact width of the <INPUT> elements to observe this behavior. NS 6.0.0.2000110801, Win NT and trunk 2000-10-30-06.
Attached file testcase
I see this in linux trunk build 2000111106. Confirming. What a weird bug... OS -> All
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows NT → All
reassigning
Assignee: rods → beppe
assigning to kin for review
Assignee: beppe → kin
Target Milestone: --- → mozilla0.9
moving to future, we will address this one when we can
Severity: normal → minor
Keywords: helpwanted
Target Milestone: mozilla0.9 → Future
QA Contact Update
QA Contact: bsharma → vladimire
I can reproduce this without JS if I paste text into such a form. Both the old and the new text must have exactly the width of the content area. A related bug is bug 66756.
Same cause as bug 50578 - there is an optimization path in the C++ side that is having side-effects when an internal state in the code ends up a constant value. I will nevertheless leave this one open.
A similar thing happens with table backgrounds: bug 91443.
*** Bug 99607 has been marked as a duplicate of this bug. ***
*** Bug 116207 has been marked as a duplicate of this bug. ***
WFM with build #2003051108 on Win98. Andreas, can you still reproduce this bug with a recent Mozilla build?
WORKSFORME, 2003-05-28-08 trunk Linux
Status: NEW → RESOLVED
Closed: 22 years ago
Keywords: testcase
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: