Closed
Bug 187066
Opened 23 years ago
Closed 23 years ago
properties scrollTop and scrollHeight of <textarea> elements exist but are not set correctly
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: martin.honnen, Unassigned)
References
Details
Attachments
(1 file)
IE's DOM has properties
scrollTop
which gives the vertical scroll offset and
scrollHeight
which gives the content height for scrollable elements like <textarea> elements
or <div> elements with CSS height set and content that overflows.
Mozilla has implemented these properties for some time for <div> or <p> elements
and when I check for a <textarea> element then the properties exist there too
but don't work correctly.
The scrollTop of a <textarea> is initially 0 which is correct but when the user
scrolls the textarea the scrollTop property is not changed. Also you cannot
scroll the textarea by setting scrollTop while IE allows that (and Mozilla too
on <div> or <p> elements).
Thus it is desirable that scrollTop for <textarea> elements works consistently
with IE.
scrollHeight of a <textarea> element also has numeric value but for an example I
checked the value seems to be way wrong.
I am going to attach a test case with a textarea where the two properties are
checked onload and when you press a button, you can scroll the textarea and see
that with Mozilla the scrollTop remains 0. There is also a button to change
scrollTop of the textarea with script, while that works with IE it doesn't work
with Mozilla.
The test case also contains a <p> element where the properties work consistently
with IE and Mozilla.
I have tested this with Mozilla 1.2.1 (Gecko/20021130).
| Reporter | ||
Comment 1•23 years ago
|
||
Comment 2•23 years ago
|
||
The scrollHeight in Textareas is covered in bug 145577, though not the scrollTop
issue.
Comment 3•23 years ago
|
||
It's dupe of bug 145577, look at comment #3.
Comment 5•23 years ago
|
||
This works fine now that bug 145577 has been fixed.
Can anyone verify? Martin?
Comment 6•23 years ago
|
||
Yes, this was fixed by the fix for bug 145577.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
Component: DOM: Mozilla Extensions → DOM
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•