Bug 10468 - [Drosera] The Console toolbar button should bring the console window to the front
: [Drosera] The Console toolbar button should bring the console window to the f...
Status: CLOSED FIXED
Product: WebKit
Classification: Unclassified
Component: New Bugs
: 420+
: Macintosh Mac OS X 10.4
: P2 Normal
Assigned To: Nobody
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-17 13:14 PDT by Pete Parks
Modified: 2008-05-17 09:55 PDT (History)
2 users (show)

See Also:


Attachments
attempted patch (24.58 KB, patch)
2006-10-28 16:52 PDT, Matt Lilek (pewtermoose)
timothy: review-
Details | Formatted Diff | Diff
revised patch (24.78 KB, patch)
2006-10-29 19:08 PST, Matt Lilek (pewtermoose)
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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@webkit.org 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 (pewtermoose) 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 (pewtermoose) 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.