[Webkit-unassigned] [Bug 7366] New: window.resize*() prevents user from subsequently changing window height

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Sun Feb 19 11:41:13 PST 2006


http://bugzilla.opendarwin.org/show_bug.cgi?id=7366

           Summary: window.resize*() prevents user from subsequently
                    changing window height
           Product: WebKit
           Version: 417.x
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at opendarwin.org
        ReportedBy: chris_swinehart at yahoo.com


Each time window.resizeBy() is called in the attached script, the minimum
height of the window seems to creep up by ten or twenty pixels. To reproduce
the bug, click the 'Resize' link a dozen times or so then try to resize the
window vertically and you'll find that you're limited in how much shorter you
can make the window. If you clicked the link enough, you won't be able to
shorten the window at all.

For whatever reason, the doResizeHack() function seems to get around this.

An additional bit of weirdness is that simply reloading the page won't restore
normal resizing. You actually need to open a new window to get control back.

---
The code:

<html>
<head>
<title>WebKit Vertical Resize Bug</title>
</head>
<body>
<script>

var whichState=true;
function doResize(){
        if (whichState){
                window.resizeBy(-140,0);
        }else{
                window.resizeBy(140,0);
        }
        whichState = !whichState;
}

function doResizeHack(){
        var winHeight = window.outerHeight - 100;
        if (whichState){
                window.resizeBy(-140,0);
                window.resizeBy(0,-winHeight);
                window.resizeBy(0,winHeight);
        }else{
                window.resizeBy(140,0);
                window.resizeBy(0,-winHeight);
                window.resizeBy(0,winHeight);
        }
        whichState = !whichState;
}
</script>
<a href="javascript:doResize()">Resize</a>

</body>
</html>


-- 
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list