Closed
Bug 295341
Opened 20 years ago
Closed 20 years ago
If you resize an input text via javascript, document.form.field.size = newsize; text of that new size continues to be truncated.
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: robert, Unassigned)
Details
(Keywords: testcase)
Attachments
(1 file)
|
5.20 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
<td>
<input type="text" size="30" maxlength="30" name="pv_notify" value=""
onChange="javascript:Query.pv_notifyinp.selectedIndex = 1;">
</td>
<td align="left" bgcolor="#eeeeee"> OR CHOOSE </td>
<td>
<select name="pv_notifyinp" onChange="javascript:if(this.value.length >
30) { Query.pv_notify.size = this.value.length; Query.pv_notify.maxlength =
this.value.length; } if(this.value != 'NEW') Query.pv_notify.value = this.value;">
<option value="NEW">NEW</option>
<option value="" selected="true"></option>
<option
value="fake@address.email,notreal@person.net,anotherfake@someplace.online">
fake@address.email,notreal@person.net,anotherfake@someplace.online
</option>
</select>
Reproducible: Always
Steps to Reproduce:
1. Create a text field of size 30. <input type="text" size="30"
name="examplefield"/>
2. Populate the value of that text field using a select field.<select
name="example_select" onChange="javascript:if(this.value.length > 30) {
document.main.examplefield.size = this.value.length;
document.main.examplefield.maxlength = this.value.length; } if(this.value !=
'NEW') Query.pv_notify.value = this.value;">
<option value="NEW">NEW</option>
<option value="" selected="true"></option>
<option
value="fake@address.email,notreal@person.net,anotherfake@someplace.online">
fake@address.email,notreal@person.net,anotherfake@someplace.online
</option>
</select>
3. Have an onchange javascript that resizes the text field if the value is
greater than 30.
4. The text field resizes but the value is truncated to the first 30 characters.
Actual Results:
The value sent from the select field to the text field was truncated even
thought the text field was resized, works fine in IE, does not work in Firefox.
Expected Results:
In addition to visually resizing the text field, it should have allowed new
values of that new size.
<html>
<head>
<title>WatchDog</title>
<style>
td{
font-family : Arial,Helvetica,Sans-serif;
font-size : 12px;
color : #000000;
}
input{
font-family : Arial,Helvetica,Sans-serif;
font-size : 12px;
color : #000000;
}
</style>
</head>
<body>
<form action="GenericReportV15.jsp" method="get" name="Query" id="Query">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan=2 >
<table width="100%" align="left" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td align="left" valign="top">
<img src="/boise/millvista/images/boise_logo.jpg" width="176" height="39">
</td>
<td align="center">
<table border=0>
<tr>
<td align="center">
<font size="4" color="#006699">
<strong>WatchDog Entries</strong>
</font>
</td>
</tr>
<tr>
<td align="center"></td>
</tr>
</table>
</td>
<td align="right" valign="top">
<table>
<tr>
<td width="50%"> </td>
<td align="right">
<table width="180" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top">
<img src="/boise/images/millvista.gif" width="176" height="39">
</td>
</tr>
<tr>
<td align="center" valign="top">
<SCRIPT LANGUAGE="JavaScript">
<!-- Idea by: Nic Wolfe (Nic@TimelapseProductions.com) -->
<!-- Web URL: http://fineline.xs.mw -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function emailPopUp() {
day = new Date();
id = day.getTime();
eval("email" + id + " = " +
"window.open('/boise/Shared/email.jsp?" +
"pv_application_name=&pv_notify=9725233379@cingularme.com%2Crobert@solsticeinc.net&pv_notifyinp=9725233379@cingularme.com%2Crobert@solsticeinc.net&pv_from=&pv_subject=&pv_body=&pv_minutes_between_beats=&pv_minutes_between_notifications=&report_dcd=WatchDog&proc_name=p_select_watchdog&report_title=WatchDog+Entries&forward_to=GenericReportV15.jsp&get_records1=Get+Records&proc_name1=rpt_watchdog_list&forward_to1=default&report_title1=WatchDog+List&proc_name2=null&forward_to2=..%2F..%2F..%2Ftable_maintenance%2FTableMaint%2FAddModRecord.jsp&report_title2=null&debug=null&email_page_path=http://localhost:8084/boise/millvista/Reports/GenericReportV3/GenericReportV15.jsp',
'" + id + "', 'toolbar=0,scrollbars" +
"=1,location=0,statusbar=1,menubar=0,resizable=1,width=640,height=200" +
",left = 320,top = 150');"
);
}
// End -->
</script>
<a href="#" class="hidden" onclick="javascript:emailPopUp();">
<img src="/boise/images/ico-email.gif"
style="width:16px;height:16px" align="absmiddle" border="0" alt="E-mail"/>
Send as E-mail
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2"><hr noshade></td>
</tr>
<tr>
<td align="left" bgcolor="#eeeeee">Application</td>
<td>
<select name="pv_application_name">
<option selected="selected" value="">
ALL
</option>
<option value="ORDERMERGE">
ORDERMERGE
</option>
<option value="ORDERPARSER">
ORDERPARSER
</option>
</select>
</td>
</tr>
<tr>
<td align="left" bgcolor="#eeeeee">Notify</td>
<td>
<table cellspacing=0 cellpadding=0>
<tr>
<td>
<input type="text" size="30" maxlength="30" name="pv_notify" value=""
onChange="javascript:Query.pv_notifyinp.selectedIndex = 1;">
</td>
<td align="left" bgcolor="#eeeeee"> OR CHOOSE </td>
<td>
<select name="pv_notifyinp" onChange="javascript:if(this.value.length >
30) { Query.pv_notify.size = this.value.length; Query.pv_notify.maxlength =
this.value.length; } if(this.value != 'NEW') Query.pv_notify.value = this.value;">
<option value="NEW">NEW</option>
<option value="" selected="true"></option>
<option
value="fake@address.email,notreal@person.net,anotherfake@someplace.online">
fake@address.email,notreal@person.net,anotherfake@someplace.online
</option>
</select>
</td>
</td>
</table>
</td>
</tr>
<tr>
<td colspan=2><hr noshade></td>
</tr>
</table>
</form>
</body>
</html>
| Reporter | ||
Comment 1•20 years ago
|
||
This attatchment shows that Firefox allows text input fields to be resized via
javascript but continues to treat the input field as though it is the original
size even though it makes it visibly larger on screen.
Comment 2•20 years ago
|
||
Robert, can you please post more explicit steps to show what the bug is wrt the
testcase.
Keywords: testcase
| Reporter | ||
Comment 3•20 years ago
|
||
Open the attachment in IE and the same attachment in Firefox.
https://bugzilla.mozilla.org/attachment.cgi?id=184404
Then, in IE, in the file found above, select the longest item in the select box.
You will see that the text field is dynamically resized per the javascript in
the html file and then is populated with the untruncated value from the select
box. Now, if you perform the same exact steps in the same exact file in
Firefox. The text field is dynamically resized but the value is truncated.
Firefox continues to treat the text field as having a size 30 even though it has
been resized.
JavaScript is case-sensitive. If your script were changed to read
"Query.pv_notify.maxLength" (note the capital L), it would work as expected.
If you have no further complaints then this bug can be resolved as INVALID as it
is not a bug with the browser.
| Reporter | ||
Comment 5•20 years ago
|
||
Well what do you know?, it does work with a capital L, and I thought the problem
was with the size attribute, but the size attribute was working the whole time,
but the maxLength was less than the size value. Thanks for the rapid help.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•