Closed Bug 218864 Opened 22 years ago Closed 15 years ago

Inspector should have a keystroke to focus the urlbar like the browser does

Categories

(Other Applications :: DOM Inspector, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: db48x, Assigned: crussell)

References

Details

Attachments

(2 files, 5 obsolete files)

Accel-l is so much quicker than the mouse for focusing the urlbar and then typing a url (I've heard that this is a common use case for the urlbar.) I've got a patch, but won't actually be able to test that it works until I get home from work this evening.
Attached patch fix (obsolete) — Splinter Review
if someone wanted to check this themselves, that'd be great. Otherwise it'll keep til tonight.
I'd much rather use a "real" auto complete widget which behaves the exact same way that the browser auto complete widget does. I think if there was something we could use that way, it would magically just work out.
Yes, that'd be nice, but I don't think that doing that would automatically make this bug go away. Mozilla has an explicit key/command for focusing the urlbar, so I'm pretty sure there's nothing in the autcomplete widget to do that. Anyway, I have a better patch that actually works and also adds a menu item and accel-r for reload, except that using the reload crashes the browser. It crashes in nsXULElement while trying to create a string to hold the command specifier for the menu item. If you want to look at the stack, I've got a copy. I'm nuking my build and recompiling from scratch because there are other weird problems.
Attached patch patch that crashes on reload (obsolete) — Splinter Review
once the crash is fixed, it will still need a tweak or two before it can be checked in
Attachment #131193 - Attachment is obsolete: true
Product: Core → Other Applications
QA Contact: timeless → dom-inspector
Attached patch clean up affected files (obsolete) — Splinter Review
Assignee: db48x → Sevenspade
Status: NEW → ASSIGNED
Attachment #465113 - Flags: review?(neil)
Attachment #131382 - Attachment is obsolete: true
Attachment #465114 - Flags: review?(neil)
Comment on attachment 465113 [details] [diff] [review] clean up affected files >+ ontextentered="inspector.gotoTypedURL();" >+ oncommand="inspector.gotoTypedURL()"/> Nit: make sure these all have their semicolons. >- <command id="cmdShowOpenURLDialog" oncommand="inspector.showOpenURLDialog()"/> >+ <command id="cmdShowOpenURLDialog" >+ oncommand="inspector.showOpenURLDialog()"/> ... >- <menuitem label="&cmdShowOpenURLDialog.label;" accesskey="&cmdShowOpenURLDialog.accesskey;" >- observes="cmdShowOpenURLDialog"/> >+ <menuitem label="&cmdEnterLocation.label;" >+ accesskey="&cmdEnterLocation.accesskey;" >+ observes="cmdEnterLocation"/> ???
Comment on attachment 465114 [details] [diff] [review] Use Firefox and SeaMonkey's keyboard shortcuts >+ if (kIsMac) { >+ document.getElementById("keyEnterLocation2").setAttribute("disabled", >+ "true"); SeaMonkey's code is different (Alt+D seems to be enabled on the Mac) and I can't find where Firefox's is, can you possibly point me to it?
(In reply to comment #8) > SeaMonkey's code is different (Alt+D seems to be enabled on the Mac) and I > can't find where Firefox's is, can you possibly point me to it? http://mxr.mozilla.org/comm-central/source/mozilla/browser/base/content/browser-sets.inc#203 I was just going by the documented keyboard shortcuts, though, originally.
Attachment #465114 - Attachment is obsolete: true
Attachment #465186 - Flags: review?(neil)
Attachment #465114 - Flags: review?(neil)
Attachment #465186 - Flags: review?(neil)
Attachment #465186 - Attachment is obsolete: true
Attachment #465576 - Flags: review?(neil)
Comment on attachment 465576 [details] [diff] [review] Really use Firefox's and SeaMonkey's keyboard shortcuts I'm not actually sure it's worth allowing for the differences in URLbar shortcut behaviour, but requesting feedback from Stefan just in case.
Attachment #465576 - Flags: feedback?(stefanh)
Comment on attachment 465186 [details] [diff] [review] realchanges + integrate last cleanup >+ <!ENTITY cmdEnterLocation.label "Inspect a URL..."> Since this no longer opens a dialog, the ellipsis is wrong. r=me with that fixed.
Attachment #465186 - Flags: review+
Attachment #465185 - Flags: review?(neil) → review+
Comment on attachment 465576 [details] [diff] [review] Really use Firefox's and SeaMonkey's keyboard shortcuts Just so I got this right by reading the code: On mac (all apps) we only use accel+L as the shortcut key For non-mac: In SeaMonkey we use accel+L and the accesskey U (Alt+U) (we actually set the accesskey for mac too), in Firefox we use Accel+L and Alt+D (no Accesskey).
(In reply to comment #14) > Comment on attachment 465576 [details] [diff] [review] > Really use Firefox's and SeaMonkey's keyboard shortcuts > > Just so I got this right by reading the code On a Mac (all apps) accel+L is available. On SeaMonkey (all platforms) the accesskey of the location bar is D. (Alt+D focuses location bar; Ctrl+D for Mac, since it uses Ctrl for accesskeys.) For non-Mac, non-SeaMonkey (including apps where we're there via supporting toolkit) Alt+D is available (no accesskey). The U accesskey that appears in inspector.dtd is the accesskey for the *menuitem* for location bar command, i.e., Inspect a _U_RL.
(In reply to comment #13) > Comment on attachment 465186 [details] [diff] [review] > realchanges + integrate last cleanup Did you mean attachment 465576 [details] [diff] [review]? Attachment 465186 [details] [diff] is obsolete.
(In reply to comment #14) > (From update of attachment 465576 [details] [diff] [review]) > Just so I got this right by reading the code: > > On mac (all apps) we only use accel+L as the shortcut key > > For non-mac: In SeaMonkey we use accel+L and the accesskey U (Alt+U) (we > actually set the accesskey for mac too), in Firefox we use Accel+L and Alt+D > (no Accesskey). Well, let's take it the other way around. Historically we used Accel+L on all browsers and platforms to focus the URLbar. But IE's shortcut is Alt+D, so we also support Alt+D to focus the URLbar. Now for some reason Firefox does that for Windows and Linux but not Mac. Would Mac users be surprised that Option+D (is that right) focuses the URLbar? Was SeaMonkey just being lazy when it set the accesskey for the textbox for all platforms?
(In reply to comment #16) > Did you mean attachment 465576 [details] [diff] [review]? Attachment 465186 [details] [diff] is obsolete. Depends on what's right for the Mac; 465186 might actually be correct.
(In reply to comment #15) > On a Mac (all apps) accel+L is available. Oh! This should have said "On all platforms (all apps) accel+L is available.".
(In reply to comment #17) > Well, let's take it the other way around. Historically we used Accel+L on all > browsers and platforms to focus the URLbar. But IE's shortcut is Alt+D, so we > also support Alt+D to focus the URLbar. Now for some reason Firefox does that > for Windows and Linux but not Mac. Would Mac users be surprised that Option+D > (is that right) focuses the URLbar? Yes (to both - actually, I think Apple is moving away from "Option" since the key is labeled "Alt" on my kb) Was SeaMonkey just being lazy when it set > the accesskey for the textbox for all platforms? Yeah, or nobody on a mac was around at that time.
Comment on attachment 465576 [details] [diff] [review] Really use Firefox's and SeaMonkey's keyboard shortcuts As a side-note, it's a bit weird with Ctrl+D to focus the url bar on mac (didn't know about it), but that has nothing to do with this bug.
Attachment #465576 - Flags: feedback?(stefanh) → feedback+
Comment on attachment 465576 [details] [diff] [review] Really use Firefox's and SeaMonkey's keyboard shortcuts So as per feedback, SeaMonkey's shortcuts are wrong, so no point copying them.
Attachment #465576 - Flags: review?(neil) → review-
In case there is some confusion on what to do for mac here: On mac, we should only have accel+L for focusing the urlbar.
And that's what attachment 465186 [details] [diff] [review] does, as I recall.
Attachment #465576 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: