Form widgets goes to wrong position after appending elements dynamically

VERIFIED DUPLICATE of bug 2595

Status

()

defect
P3
normal
VERIFIED DUPLICATE of bug 2595
20 years ago
17 years ago

People

(Reporter: hhedberg, Assigned: beard)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

()

Reporter

Description

20 years ago
When JavaScript code appends some elements to the end of document using DOM
and viewable area is not at top, form widgets goes to wrong position.
In viewer those goes up like document page coordinates would be the viewable
client coordinates. In apprunner (if you first resize window to get scrollbars;
I think that is already reported bug) those goes down.

Steps to reproduce:

1) View http://www.iki.fi/hhedberg/bugzilla/textwidget.html (or code included)
2) Scroll window down (or if the whole document fits, modify code by
   increasing 'enouhgt' variable).
3) Press 'Press!' to add new element at the end of document.
4) Now you should see that text widget has moved outside from table!

Occurs at least on M8 / Linux with GTK-widgets.

---CODE---
<html>
<head>
<title>Bug</title>
<script language="JavaScript">
var enought = 4;
function appendNode() {
	taulukko = document.getElementById( "taulukko" );
	alkio = document.createElement( "P" );
	alkio.appendChild( document.createTextNode( "Some" ) );
	taulukko.parentNode.appendChild( alkio.cloneNode( true ) );
}
</script>
</head>
<body onload="setUp()">
<script language="JavaScript">
for( i = 0; i < enought; i++ )
	document.writeln( '<p>' + i + " Is this long enoungt?</p>" );
</script>
<form>
<table border=1 cellpadding=10 id="taulukko">
<tr><td><input type=text></td></tr>
</table>
<script language="JavaScript">
for( i = 0; i < enought; i++ )
	document.writeln( '<p>' + i + " Is this long enoungt?</p>" );
</script>
<p><a href="" onclick="appendNode();return false">Press!</a></p>
</body>
</html>

Updated

20 years ago
QA Contact: petersen → chrisd

Updated

20 years ago
Assignee: troy → beard

Comment 1

20 years ago
On Windows I don't see the problem with the form element moving outside of the
table, so I don't know if it's Linux only or has been fixed
Reporter

Comment 2

20 years ago
Agreed, I haven't seen this in Windows builds. Anyway, it has NOT
been fixed (now tested with viewer and apprunner build 3-Aug-1999).

Here is another code for testing:

http://www.iki.fi/hhedberg/bugzilla/textwidget2.html

The line which appends node is needed. Without it bug disappears.
In this example GTK-widgets goes to wrong position every one second
(setInterval) if you scroll the document.

Updated

20 years ago
QA Contact: chrisd → petersen
Assignee

Updated

20 years ago
Status: NEW → ASSIGNED

Updated

20 years ago
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE

Comment 3

20 years ago
Like i said before to beard on email, this bug is as dup of one I had.

And the good news is I just checked in a fix.  The M9 release will survive your
test just fine.  Thanks.

Marking dup of bug 2595.

*** This bug has been marked as a duplicate of 2595 ***

Updated

20 years ago
Status: RESOLVED → VERIFIED

Comment 4

20 years ago
Agreed. Marking as verified duplicate.

Comment 5

17 years ago
*** Bug 144429 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.