Bug 130845

Summary: image 'height' attribute is a javascript string
Product: [Applications] konqueror Reporter: Tim <lecit>
Component: kjsAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Tim 2006-07-15 02:21:47 UTC
Version:            (using KDE KDE 3.5.3)
Installed from:    Compiled From Sources
Compiler:          gcc-4.1.1 
OS:                Linux

The 'height' attribute of an img element is treated like a string in javascript.

How Reproducible:
100%

Steps to Reproduce:
1. View the following document:

<html>
<head>
<script language="javascript"><!--
function init (Id) {
alert(document.getElementById(Id).height + 1 + 2 + 3);
}
--></script>
</head>
<body onLoad="init('id1')">
<img id="id1" src="/dev/null" height="50">
</body>
</html>

Actual Results:
'6'

Expected Results:
'56'

Additional Information:
This works properly in Mozilla/firefox
Comment 1 Maksim Orlovich 2006-07-15 02:28:10 UTC
It's not a string, you just get a 0 back here.
Comment 2 Andreas Kling 2006-07-15 07:35:11 UTC

*** This bug has been marked as a duplicate of 129307 ***