.setTimeout with .innerHTML starts blinking in the moment of "refresh"

RESOLVED DUPLICATE of bug 170702

Status

()

Core
DOM: Core & HTML
RESOLVED DUPLICATE of bug 170702
15 years ago
10 years ago

People

(Reporter: Mirco Pötter, Unassigned)

Tracking

({testcase})

Trunk
x86
Other
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.3) Gecko/20030312
Build Identifier: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.3) Gecko/20030312

example html-code:
-------------------------------------------
<html>
<body>


<table>
<tr>
<td id="Time">

<SCRIPT type=text/javascript>

	time();
	
function time() 
	{
	document.getElementById('Time').innerHTML=new Date().getHours()+":"+new
Date().getMinutes()+":"+new Date().getSeconds();
	
	window.setTimeout("time()",1000);
	}


</SCRIPT>

</td>
</table>

</body>
</html>
----------------------------------

the .setTimeout with the .innerHTML refreshes the <td> every sec, which is
working. but after 3-4 secs the refresh itself is visible. there is a short
period where the text is away, just a blank screen and then the new text is
displayed.
the first 1-2 times the new text is displayed without a visible refresh.

when u set the refresh-time to 100 (or so) this effect looks like blinking, but
only after 3-4 secs. when u reload the page, it's not blinking for 3-4 secs but
then again.

Reproducible: Always

Steps to Reproduce:
1. copy&paste the html-code and see.


Actual Results:  
the refresh is visible after 3-4 secs, it's like blinking.

Expected Results:  
the refresh should not be visible like in the first 1-2 secs.

Comment 1

15 years ago
Created attachment 121832 [details]
testcase using 2 different content objects

I think this is a duplicate of bug #170702. When writing the new content to
firstChild.nodeValue instead of innerHTML then the flickering stops. Even the
weird workaround with outerWidth, etc... works.
(Reporter)

Comment 2

15 years ago
true, it's the same bug.
firstChild.nodeValue works fine with Mozilla, but it simply does not work with IE.
u can get around this while using firstChild.nodeValue and innerText (which is
not working with mozilla).
but i think it is a bug that can be fixed in 1.4 easily, because it is working
fine in the first secs.

Comment 3

15 years ago
--> default owner
Assignee: asa → dom_bugs
Component: Browser-General → DOM HTML
Keywords: testcase
QA Contact: asa → desale

Comment 4

15 years ago
Duping per Reporters comment.

*** This bug has been marked as a duplicate of 170702 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → DUPLICATE

Updated

10 years ago
Component: DOM: HTML → DOM: Core & HTML
QA Contact: desale → general
You need to log in before you can comment on or make changes to this bug.