WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 23603
Bug 24218
Safari 4 javascript window resize inconsistency
https://bugs.webkit.org/show_bug.cgi?id=24218
Summary
Safari 4 javascript window resize inconsistency
Kevin M. Dean
Reported
2009-02-26 17:51:34 PST
I have a series of bookmarks I use to trigger javascript window resizing and moving. Here's the address fields for some of those bookmarks. Each line is a different bookmark javascript:self.moveTo(0,0);self.resizeTo(screen.availWidth,screen.availHeight); javascript:resizeTo(800,533); javascript:resizeTo(1024,713); javascript:moveTo(0,0); Under Safari 4, if I have 1 tab open, they work as expected. As soon as I open another tab, they no longer work no matter which tab is selected. I'll submit this via the Safari bug button as well just in case it's their issue.
Attachments
Add attachment
proposed patch, testcase, etc.
ar
Comment 1
2009-03-31 00:43:06 PDT
Seconded. It does work sometimes. I can get it to work on a newly created window (but not consistently... I haven't figure out the pattern), but not a window that's been around the whole session. Sometimes I can get around it by creating a new window and manually moving all of the tabs from the previous (not working) window to the new one.
Sam Garfield
Comment 2
2009-05-15 16:17:03 PDT
I think this may be indicative of a more general problem with the javascript engine. Whatever the bug is that is causing this will probably crop up in other places as well. I rely on these bookmarklets and this is my biggest annoyance with Safari 4/Webkit. But I love everything else so much I can't go back (top bar tabs FTW!) I'm kinda surprised this hasn't gotten more attention as I know a lot of web developers who use these kinds of things.
Kevin M. Dean
Comment 3
2009-06-08 15:14:50 PDT
Well Safari 4 Final still leaves this broken.
Cody Robbins
Comment 4
2009-06-13 16:55:56 PDT
Here is a reproducible test case for this bug on my system: 1. Open Safari. 2. Create bookmarks with the following addresses: javascript:moveTo(0,0); javascript:resizeTo(100,100); 3. Open two tabs in the same window. 4. Click both bookmarks. Neither results in the expected behavior. 5. Close the second tab so that there is only one tab open in the window, and click both bookmarks. Both result in the expected behavior. It does not appear to make a difference whether the window is new or has been open for the entire session. The problem occurs if you open Safari fresh and click the bookmarks immediately. System details: MacBook Pro 2.2GHz Intel Core 2 Duo OS X 10.5.7 build 9J61 Safari 4.0 (5530.17)
Cody Robbins
Comment 5
2009-06-13 17:26:46 PDT
Never mind, I downloaded the WebKit source and tracked what was causing this undesired behavior, and as far as I can tell it appears as though the problem is with Safari, not WebKit. WebChromeClient::setWindowRect in mac/WebCoreSupport/WebChromeClient.mm sends setFrame:windowRect: to WebUIDelegate with the exact same window rectangle regardless of the number of tabs open. The message simply doesn't result in the window being moved when there is more than one tab. See
http://blog.wearesakuzaku.com/fixing-maximize-bookmarklets-in-safari-4/
for a more detailed explanation. I filed a bug for Safari on Radar describing the problem. I think this ticket should be closed since it's not a WebKit problem.
Sam Garfield
Comment 6
2009-08-11 15:29:56 PDT
Are we sure this isn't a webkit problem? The same bug exists in webkit.
Kevin M. Dean
Comment 7
2010-06-07 17:59:46 PDT
Of course, Safari 5 does nothing to fix this.
Alexey Proskuryakov
Comment 8
2010-06-08 13:19:43 PDT
> I filed a bug for Safari on Radar describing the problem. > I think this ticket should be closed since it's not a WebKit problem.
The bug was filed as <
rdar://problem/6970303
>. But this is really a duplicate of
bug 23603
, and I'll comment there. *** This bug has been marked as a duplicate of
bug 23603
***
Kevin M. Dean
Comment 9
2010-06-14 12:31:25 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/
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug