Bug 23603 - REGRESSION: programmatic window sizing broken if window has multiple tabs
Summary: REGRESSION: programmatic window sizing broken if window has multiple tabs
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: javascript:window.resizeTo(800,600);
Keywords: InRadar, Regression
: 24218 25289 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-01-28 14:27 PST by Alice Liu
Modified: 2010-06-14 12:30 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alice Liu 2009-01-28 14:27:26 PST
programmatic window sizing is broken if window has multiple tabs  Happens on both Mac and Windows.  I'm running r40306.

Steps to repro: 
1) open a new window, and if necessary, resize it to something you know of to be larger than 800x600
2) create a new tab in this window
3) javascript:window.resizeTo(800,600);
Results: resize doesn't work
4) close a tab
5) javascript:window.resizeTo(800,600);
Results: resize works

<rdar://problem/6537031>
Comment 1 Cameron Zwarich (cpst) 2009-04-20 16:24:55 PDT
moveTo also doesn't work.
Comment 2 Cameron Zwarich (cpst) 2009-04-20 16:25:10 PDT
*** Bug 25289 has been marked as a duplicate of this bug. ***
Comment 3 Cameron Zwarich (cpst) 2009-04-20 16:32:26 PDT
This appears to be a regression in Safari. When using Safari 3.2 with Safari 4.0 beta's WebKit or a a local debug build of WebKit it works fine.
Comment 4 Cameron Zwarich (cpst) 2009-04-20 16:33:06 PDT
I'll mark this Invalid because it's a Safari bug. An Apple person should note this in the Radar.
Comment 5 Alexey Proskuryakov 2010-06-08 13:19:43 PDT
*** Bug 24218 has been marked as a duplicate of this bug. ***
Comment 6 Alexey Proskuryakov 2010-06-08 13:34:36 PDT
This was a deliberate behavior change to address the following highly annoying problem:

---------------------------
Steps to reproduce:
1. Go to http://www.cnn.com/POLITICS/
2. Middle/command click one of the video links

Results: The whole window is resized.  I would expect the new tab to not affect the size of the window.
---------------------------

Judging from the number of complaints here and in duplicates, it is possible that the cure was worse than original problem. I can see how this is a problem for Web designers.
Comment 7 Kevin M. Dean 2010-06-08 16:59:23 PDT
I'd  be fine if the code was allowed to function when manually triggered from bookmarks even with multiple tabs while limiting the function when trigger from browser code in non-single window situations. Seems that would be a good compromise if that kind of delineation could be made.
Comment 8 Alexey Proskuryakov 2010-06-08 17:06:24 PDT
Sounds reasonable to me, although I'm not immediately sure how to implement that. Another possible approach is to allow resizing from user gesture events.

Could you please file a new bug via <http://bugreport.apple.com>?
Comment 9 Kevin M. Dean 2010-06-08 17:16:33 PDT
I believe the bug has already been filed a few times by people, so maybe someone more connected to Safari development can take a look a do what's best.
Comment 10 Alexey Proskuryakov 2010-06-08 17:39:10 PDT
I took a look, which is why I asked to file a new bug.
Comment 11 Kevin M. Dean 2010-06-14 12:30:59 PDT
There's a new Safari 5 extension that can resize the windows even with multiple tabs. It's quite nice.

http://www.apfelquak.de/2010/06/12/maximize-safari-extension/