Closed
Bug 301971
Opened 21 years ago
Closed 20 years ago
Frame reloads when switching from display:none to display:block
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: ts, Unassigned)
Details
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
I have a dynamic webpage with an iframe which can be switched from
display:block to display:none and vice versa. The iframe can also load
documents with framesets defined in them.
When I want to hide the iframe and reshow it, the page-contents of the frames
defined in the frameset (which where loaded into the iframe) are reloading.
Reproducible: Always
Steps to Reproduce:
1. Create a page with an iframe. Point the src-attribute to html-file with a
frameset defined in it.
2. Create a button with the appropriate javascript-function that can
dynamically set the style-attribute display:none and display:block
3. Press the button!
Actual Results:
The iframe is not visible anymore. After switching back to reshow the iframe,
the contents of the frameset within the iframe where reloaded.
Expected Results:
It should have not reloaded the frameset within the iframe.
Comment 1•21 years ago
|
||
I suspect this is because display:none remove the element and its resources
altogether from the page.
Try visibility:hidden;.
I could be wrong though.
| Reporter | ||
Comment 2•21 years ago
|
||
(In reply to comment #1)
> I suspect this is because display:none remove the element and its resources
> altogether from the page.
The reload does not happen when the iframe holds a regular page (without a
frameset defined in it).
> Try visibility:hidden;.
Its not an option... it would be an ugly workaround. the Display:block removes
the element, whereas visibility only hides it, but does not leave any room for
other elements to use the space.
Comment 3•21 years ago
|
||
reporter, does this happen with deer park alpha 2? (firefox 1.1 alpha)?
If so, can you attach a testcase?
| Reporter | ||
Comment 4•21 years ago
|
||
(In reply to comment #3)
> reporter, does this happen with deer park alpha 2? (firefox 1.1 alpha)?
> If so, can you attach a testcase?
Fortunately, the frameset does not get reloaded in Deer Park Alpha 2
(Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b3) Gecko/20050712
Firefox/1.0+)
It works like a charm! :)
Comment 5•20 years ago
|
||
WFM on trunk per comment 4 from the reporter.
See also bug 343235, "iframe content is reloaded if its parentNode changed".
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•