Bug 160314

Summary: Double scrollbars caused by some css hacks
Product: [Applications] konqueror Reporter: Niko Efthymiou <kde>
Component: generalAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:

Description Niko Efthymiou 2008-04-03 12:47:45 UTC
Version:            (using KDE 3.5.8)
Installed from:    Gentoo Packages
Compiler:          gcc (GCC) 4.2.3 (Gentoo 4.2.3 p1.0) 
OS:                Linux

How to reproduce

Some sites try to force scrollbars. This is usualy done with some css "hack" like the following, to force scrollbars:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
  <style type="text/css">
   html {
    height:100%;
    margin-bottom:0.1em;
    overflow-y:scroll;
   }
  </style>
 </head>
 <body>
  <p>foo</p>
  <!-- enaugh content to fill more than the viewport-->
 </body>
</html>

Konqueror displays two scrollbars. The usual one for The entire document and directly besides it one for the <html> tag. 

The window scrollbar scrolls as if the document had its normal height, but after the height of the current viewport, only white space apears. The second scrollbar scrolls the document.

Document navigation breaks, when this happens, since both keyboard and mousewheel scroll the window scrollbar and not the <html> scrollbar.

Expected behaviour:

Other browsers including Firefox 2/3, Opera 9.x, IE 6/7 only show one scrollbar. 

Rational:

While I don't realy think that Konqueror misbehaves here, this css hack is not going to go away, since it works on the major browsers. Therefore it is my opinion, that for the sake of usability, konqueror should map the scrollbars for the <html> tag to the window scrollbar.
Comment 1 Germain Garand 2008-04-03 14:12:04 UTC
the fix's been recently backported in 3.5 branch, you'll just have to ask your vendor to pick up the patch.

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