Closed
Bug 292790
Opened 20 years ago
Closed 20 years ago
javascript div hide/show in IFRAME using display:block reset scroll
Categories
(Firefox :: General, defect)
Tracking
()
VERIFIED
INVALID
People
(Reporter: commerce, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
Executing this Javascript:
document.getElementById('divname').style.display="block";
to show a DIV tag defined by this HTML:
<div id='divname' style="display:none"><table>...</table></div>
Within a scrolling iframe causes the scroll position of that iframe to reset to
the top. Thus, if one scrolls past the fold and clicks to update a page
element, that element is effectively lost to view. Using an anchor tag and
'location.hash' to bring clicked element back into view behaves less than
perfectly, as element is not necessarily at the top of the scroll-view when clicked.
Arguably, proper behavior is no scroll reset upon execution of this form of
javascript.
Reproducible: Always
Steps to Reproduce:
1. Define JS to show/hide an in-IFRAME DIV element using style="display:block|none"
2. Render page in Firefox
3. Scroll IFRAME past fold
4. Execute JS on DIV element visible in scrolled IFRAME
Actual Results:
IFRAME scroll position resets to top
Expected Results:
No scroll position reset should be performed unless explicitly requested
Comment 1•20 years ago
|
||
Can you please attach a testcase?
In my efforts to create a testcase that won't expose the production page which spawned the bug, I found that I couldn't reproduce the bug! And now the production page works! I apologize for cluttering inboxes; this must have been an HTML error on my part which I unwittingly fixed.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Updated•20 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•