Bug 10468

Summary: [Drosera] The Console toolbar button should bring the console window to the front
Product: WebKit Reporter: Pete Parks <pete.parks>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: CLOSED FIXED    
Severity: Normal CC: mitz, mrowe
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
attempted patch
timothy: review-
revised patch timothy: review+

Description Pete Parks 2006-08-17 13:14:07 PDT
If your debugging via console to print out non-local variable and you allow that window to slip into the background clicking on the Console Icon in Drosera should bring that window to the foreground and in focus for events. 

As is, it does nothing and can be confusing if you have lots of windows obsuring it and if you keep clicking the Console Icon expecting the window to come to the front. You'll be waiting a while.
Comment 1 mitz 2006-08-17 13:22:05 PDT
I think there should also be a menu command that does the same thing the toolbar button does.
Comment 2 Matt Lilek 2006-10-28 16:52:09 PDT
Created attachment 11270 [details]
attempted patch

Fixes focus bug and makes command + L activate the console as well.
Comment 3 Timothy Hatcher 2006-10-29 17:15:00 PST
Comment on attachment 11270 [details]
attempted patch

Actually i think this should be: if (consoleWindow.blur)

if (!consoleWindow.focus())

Dosent make sense.
Comment 4 Timothy Hatcher 2006-10-29 17:17:31 PST
Comment on attachment 11270 [details]
attempted patch

Actually this should just be an else case. No harm in calling focus() if the console is already focused.

    if (!consoleWindow)
         consoleWindow = window.open("console.html", "console", "top=200, left=200, width=500, height=300, toolbar=yes, resizable=yes");
+    else
+        consoleWindow.focus();
Comment 5 Timothy Hatcher 2006-10-29 17:19:59 PST
No need for the {} braces on the if and else, since they are one line statments.
Comment 6 Timothy Hatcher 2006-10-29 17:21:17 PST
My if (consoleWindow.blur) comment was wrong also. THere is no property on the window bject to test if it already has focus. The original patch was just always focusing the window (twice!).
Comment 7 Matt Lilek 2006-10-29 19:08:12 PST
Created attachment 11280 [details]
revised patch
Comment 8 Timothy Hatcher 2006-10-30 08:35:07 PST
Landed in r17436.
Comment 9 Timothy Hatcher 2008-05-17 09:55:57 PDT
Closing since Drosera has been replaced by the new Web Inspector debugger. Moving to the New Bugs component so the Drosera component can be closed and removed.