Closed
Bug 232172
Opened 21 years ago
Closed 21 years ago
Make link modifiers work on the home button
Categories
(Firefox :: Toolbars and Customization, enhancement)
Firefox
Toolbars and Customization
Tracking
()
RESOLVED
FIXED
Firefox1.0beta
People
(Reporter: steffen.wilberg, Assigned: steffen.wilberg)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 4 obsolete files)
2.78 KB,
patch
|
Details | Diff | Splinter Review |
I'd like the home button to behave somewhat like a bookmark on the bookmarks
toolbar: It should open a new tab (or several, if you have multiple homepages)
upon middle-clicking or ctrl-left-clicking.
Assignee | ||
Comment 1•21 years ago
|
||
To be complete and consistent, shift-left-click that button should open a new
window just like ctrl-n does.
Summary: add middle-click and ctrl-left-click action to the home button → add middle-click, ctrl-left-click and shift-left-click action to the home button
Assignee | ||
Comment 2•21 years ago
|
||
Use the new function BrowserHomeClick to take care of mouseclicks.
I also simplified the loadOneOrMoreURIs function: It's not necessary to check
if there are multiple homepages. The code used for those works fine for single
homepages as well.
loadOneOrMoreURIs is called from BrowserHomeClick in case of simple
left-clicks.
Upon shift-left-clicks, OpenBrowserWindow() is called, that's just like
pressing ctrl-n.
Upon middle-clicks or ctrl-left-clicks, BrowserHomeClick uses code that is
derived from loadOneOrMoreURIs. It adds a new tab for your homepage, or
multiple tabs if you have more than one.
I don't think it's worth respecting "browser.tabs.opentabfor.middleclick". It's
set to true by default on all platforms and I can't imagine anyone setting that
to false.
Do Macs use different buttons?
Assignee | ||
Comment 3•21 years ago
|
||
Comment on attachment 139891 [details] [diff] [review]
patch
>+ if (aEvent.button == 1 || (aEvent.button == 0 && aEvent.ctrlKey)) { // middle-click or left-click and ctrl
I'll replace "left-click and ctrl" with "ctrl-left-click" in the next revision.
Assignee | ||
Comment 4•21 years ago
|
||
Comment on attachment 139891 [details] [diff] [review]
patch
Pierre, what do you think?
Attachment #139891 -
Flags: review?(p_ch)
Comment 5•21 years ago
|
||
This is a dup of bug 197304.
Comment 6•21 years ago
|
||
*** Bug 197304 has been marked as a duplicate of this bug. ***
Updated•21 years ago
|
Blocks: link-modifiers
Comment 7•21 years ago
|
||
Wouldn't it be possible to reuse/refactor the code that loads what's in the urlbar?
Assignee | ||
Comment 8•21 years ago
|
||
Pierre, I don't think so. When you submit an url in the urlbar by hitting enter
or clicking the go-button, handleURLBarCommand is called, which calls
canonizeUrl and BrowserLoadURL, all in browser.js. These functions don't support
opening multiple pages at once, which is what we need for multiple homepages.
And BrowserLoadURL only checks for alt-enter to open a new tab. But we need
middle-click and ctrl-left-click here.
I thought about bookmarks code, but bookmarks don't support multiple pages
either. And we don't need that support in bookmarks, do we?
Assignee | ||
Updated•21 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → Firefox0.9
Assignee | ||
Comment 9•21 years ago
|
||
Comment on attachment 139891 [details] [diff] [review]
patch
Blake, what do you think?
Attachment #139891 -
Flags: review?(p_ch) → review?(firefox)
Comment 10•21 years ago
|
||
My only problem with this is that it introduces a rather large UI inconsistency.
The Home button would support Middle click/shift click, ect, but the other
navigation toolbar buttons would not. I personally think that if open in new
tab/new window functions are going to be added to Navbar buttons, it should be
done to all of them (like MozFBRH does) or none of them (left to extensions).
Comment 11•21 years ago
|
||
I am in agreement with Comment 10, though if the devs agree I think we should
either change the summary of this bug to cover all navigation bar items, or
create a new bug to cover buttons other than the home button.
What do people suggest?
Comment 12•21 years ago
|
||
I think this behaviour would be fantastic for all the buttons -- and also the
back/forward drop-downs.
I've used MozFBRH extension and think this is exactly the sort of tiny
improvement that the base browser should have, every user should benefit! (In
particular, Shift+left-click refresh acts like Ctrl+N in IE, forking your
browser session from the current page).
One thing to note, is that Ctrl+click refresh already means "force reload" --
(have to use Shift+Ctrl+click instead?)
Comment 13•21 years ago
|
||
I am in full agreement with comment 12 and would like to add that the throbber
(which links to the firefox site) should have this function as well.
Assignee | ||
Comment 14•21 years ago
|
||
I can implement this for other buttons as well, but I'd like to a word from a
dev first that this would be acceptable (not wontfix). My patch for the home
button is already 2 months old.
Comment 15•21 years ago
|
||
The throbber is no navigational toolbar item (even though it links to the
firefox page by default). It is a branding item, which also shows loading activity.
Do not add middle-click, ctrl-left-click and shift-left-click action to the
throbber.
Comment 16•21 years ago
|
||
*** Bug 239437 has been marked as a duplicate of this bug. ***
Comment 17•21 years ago
|
||
*** Bug 240624 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 18•21 years ago
|
||
The comment change I promised in comment 3.
Attachment #139891 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Attachment #139891 -
Flags: review?(firefox)
Assignee | ||
Comment 19•21 years ago
|
||
Comment on attachment 149227 [details] [diff] [review]
patch v1.1
Ben, this makes the home button behave like a bookmark on the bookmarks
toolbar. Also works for multiple homepages. It doesn't change anything visual,
it just makes the button more powerful.
Explanation is in comment 2.
Attachment #149227 -
Flags: review?(bugs)
Comment 20•21 years ago
|
||
Bug 198028 is requesting similar functionality for Go button.
Assignee | ||
Updated•21 years ago
|
Target Milestone: Firefox0.9 → Firefox1.0beta
Assignee | ||
Comment 21•21 years ago
|
||
Comment on attachment 149227 [details] [diff] [review]
patch v1.1
I want to make use of the functions Jesse proposed in his patch for bug 246719.
-> Removing review request.
Attachment #149227 -
Flags: review?(bugs)
Assignee | ||
Comment 23•21 years ago
|
||
This patch uses whereToOpenLink() and mimics openUILinkIn(), introduced by
Jesse in bug bug 246719. All the link modifiers work for single and multiple
homepages. I limited saving to the first homepage though.
Assignee | ||
Updated•21 years ago
|
Attachment #149227 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Summary: add middle-click, ctrl-left-click and shift-left-click action to the home button → Make link modifiers work on the home button
Assignee | ||
Updated•21 years ago
|
Attachment #151941 -
Flags: review?(bryner)
Updated•21 years ago
|
Attachment #151941 -
Flags: review?(bryner) → review+
Assignee | ||
Comment 24•21 years ago
|
||
I hate these js strict warnings, so I shouldn't introduce another.
Assignee | ||
Updated•21 years ago
|
Attachment #152655 -
Attachment description: fix js warning: redeclaration of urls → patch v1.3 - fix js warning: redeclaration of var urls
Assignee | ||
Comment 25•21 years ago
|
||
Attachment #151941 -
Attachment is obsolete: true
Attachment #152655 -
Attachment is obsolete: true
Assignee | ||
Comment 26•21 years ago
|
||
Trunk checkin: 2004-07-16 09:32
Branch checkin: 2004-07-16 09:39
Fixed!
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 27•20 years ago
|
||
*** Bug 262432 has been marked as a duplicate of this bug. ***
Updated•18 years ago
|
QA Contact: bugzilla → toolbars
You need to log in
before you can comment on or make changes to this bug.
Description
•