Closed
Bug 100727
Opened 23 years ago
Closed 23 years ago
Javascript to modify textarea causes field to go blank/unchangeable
Categories
(Core :: DOM: Editor, defect, P3)
Tracking
()
mozilla0.9.7
People
(Reporter: jrhett, Assigned: kinmoz)
References
()
Details
(Whiteboard: [EDITORBASE] CANDIDATE_094, depends on bug 74383, fixed on trunk)
Attachments
(1 file)
(deleted),
text/html
|
Details |
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:0.9.4) Gecko/20010913
BuildID: 2001091303
Using javascript to modify a textarea causes the field to go blank and
uneditable/unselectable. The information is still in the field (hitting submit
provides the information) but you can't see it on the screen or edit it after
the javascript takes effect.
Reproducible: Always
Steps to Reproduce:
1. Make a textarea with an onChange function that modifies the field.
2. Select the textarea element
3. Type something in the field and then hit tab
4. Watch as the field goes blank and unselectable.
Actual Results: The field appeared blank, and I could not select it to edit the
data. However the data did submit with the form just fine.
Expected Results: The data in the field should remain visible, and I should be
able to select and edit the field again.
<TEXTAREA NAME="Description" COLS=43 ROWS=6 WRAP="Virtual" onchange="this.value
= truncateString( this, 250 ); ">type something here</TEXTAREA>
// truncate string to maxlength
function truncateString( S, maxlength )
{
if( S.value.length <= maxlength ) return S.value ;
var i ;
var outString = "" ;
for( i=0; i<maxlength; i++) {
outString += S.value.charAt(i);
}
alert("Text truncated to " + maxlength + " characters.") ;
return outString ;
}
Comment 1•23 years ago
|
||
FYI I think you could just do this.value=value.substring(0,250)
Comment 2•23 years ago
|
||
worksforme, linux build 2001-09-19-08. Windows-only?
ccing jkeiser to add this to his form control tests
Comment 3•23 years ago
|
||
->editor: core
Assignee: asa → kin
Component: Browser-General → Editor: Core
QA Contact: doronr → sujay
Severity: blocker → major
Priority: -- → P3
Target Milestone: --- → mozilla0.9.5
I just attatched Joe's test case, but I can't reproduce this in my 09/21/01
Win32 debug build.
Joe, can you try this with a recent build?
Marking WFM since I can't reproduce this. jrhett please reopen if you still see
the problem in a recent build.
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
Appears to be resolved in 0.9.5. Thanks!
Status: VERIFIED → CLOSED
I agreed with the assessment that this appeared fixed, but over the last few
weeks I've started seeing the problem again. It's no longer 100% reproducable,
but it still happens far too much. The longer the browser is up and working,
the more likely this problem is to occur -- so we've got a state issue here.
Status: CLOSED → UNCONFIRMED
Resolution: WORKSFORME → ---
Assignee | ||
Comment 10•23 years ago
|
||
Joe, are you seeing this problem again in nightly TRUNK builds? I'm wondering if
this is related to bug 97674, which is fixed on the trunk, but isn't fixed 0.9.5
builds.
When the text disappears, is it just invisible until you hilite/select the text
where it should be via the mouse or Ctrl-A? Or does it come back if you obscure
the textarea with another window and then expose it again?
Target Milestone: mozilla0.9.5 → mozilla0.9.7
Comment 11•23 years ago
|
||
WFM Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.5+) Gecko/20011107
Comment 12•23 years ago
|
||
This WFM on Linux 2001110808 (though all cases reported have been on Windows).
Joe, can you try a recent build? There have been a recent changes to textarea
and modification of value, though nothing *specifically* to resolve this.
Assignee | ||
Comment 13•23 years ago
|
||
Fix for bug 74383 checked into trunk:
mozilla/layout/xul/base/src/nsBoxToBlockAdaptor.cpp revision 1.33
I'm leaving this open till I can land this on the 0.9.4 branch.
Keywords: vtrunk
Whiteboard: EDITORBASE → [EDITORBASE] CANDIDATE_094, depends on bug 74383, fixed on trunk
Assignee | ||
Comment 14•23 years ago
|
||
*** This bug has been marked as a duplicate of 74383 ***
Status: ASSIGNED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•