Bug 266118

Summary: changes to innerHTML is not displayed
Product: [Applications] konqueror Reporter: Sergey Burladyan <eshkinkot>
Component: khtmlAssignee: Konqueror Bugs <konqueror-bugs-null>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: maksim
Priority: NOR    
Version First Reported In: 4.4.5   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Sergey Burladyan 2011-02-12 03:59:30 UTC
Version:           4.4.5 (using KDE 4.4.5) 
OS:                Linux

If <span></span> is empty, it does not changed if i run .innerHTML = 'asdf';

Reproducible: Always

Steps to Reproduce:
Set focus into f1 INPUT and press UP and DOWN keys several times.

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title></title>
  <script src="https://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js" type="text/javascript"></script>
  <style type="text/css">
    #r2 {
	position: absolute;
    }
  </style>
<script type="text/javascript" charset="utf-8">
//<![CDATA[
document.observe("dom:loaded", function() {
    Event.observe('f1', 'keyup', (function() {
	var input = $('f1');
	var r1 = $('r1');
	var r2 = $('r2');
	return function (e) {
	    if (e.keyCode == Event.KEY_DOWN) {
		r1.innerHTML = '';
		r2.innerHTML = '&nbsp;';
	    } else if (e.keyCode == Event.KEY_UP) {
		r1.innerHTML = input.value;
		r2.innerHTML = input.value;
	    }
	}
    })());
});
//]]>
</script>
</head>
<body>
<form id="crash" action="">
<div id="clean">
SPAN without &amp;nbsp; <span id="r1">&nbsp;</span>
<br/>
SPAN with &amp;nbsp; <span id="r2">&nbsp;</span>
<br/><input type="text" id="f1" value="val"></input>
</div>
</form>
</body>
</html>


Actual Results:  
r2 is changing, but r1 is changed only once.

Expected Results:  
r1 and r2 should look the same on the screen and change simultaneously.
Comment 1 Maksim Orlovich 2011-02-13 17:11:39 UTC
DOM update is fine, so it's indeed the rendering portion that's missing
Comment 2 Justin Zobel 2021-03-21 00:25:17 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 10 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 3 Sergey Burladyan 2021-03-22 10:59:27 UTC
> we ask if you can please confirm that the issue still persists.

Yes, I copy-paste HTML from first message and test behaviour with
Konqueror 4.14.13
KDE 4.14.38
Slackware 14.2

I confirm that with this versions the issue still persists.
Comment 4 Christoph Cullmann 2024-05-06 18:39:09 UTC
Dear user,

KHTML (and KJS) was a long time more or less unmaintained and got removed in KF6.

Please migrate to use a QWebEngine based HTML component.

We will do no further fixes or improvements to the KF5 branches of these components beside important security fixes.

For security issues, please see:

https://kde.org/info/security/

Sorry that we did not fix this issue during the life-time of KHTML.

Greetings
Christoph Cullmann