Closed Bug 345031 Opened 18 years ago Closed 17 years ago

History>Home should be middle-clickable

Categories

(Firefox :: Menus, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
Firefox 3 beta3

People

(Reporter: ventnor.bugzilla, Assigned: ventnor.bugzilla)

Details

Attachments

(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060714 Minefield/3.0a1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060714 Minefield/3.0a1

While the Home button in the toolbar graciously enjoys its ability to handle middle-clicks, the option in History>Home is lacking. History>Back and History>Forward can be middle clicked so for consistency History>Home should be too. I have made a patch and its coming up.

Reproducible: Always
Attached patch Patch (obsolete) — Splinter Review
Lets History>Home correctly handle middle clicks.
Attachment #229647 - Flags: review?(mconnor)
Version: unspecified → Trunk
Attachment #229647 - Flags: review?(mconnor) → review?(bugs.mano)
Comment on attachment 229647 [details] [diff] [review]
Patch

Again, get ui-review (from beltzner or mconnor) on this kind of changes before requesting review. Thanks.
Attachment #229647 - Flags: review?(bugs.mano)
Sorry, I submitted this patch before you told me about the UI review thing. :)
Attachment #229647 - Flags: ui-review?(beltzner)
Comment on attachment 229647 [details] [diff] [review]
Patch

I didn't apply the patch, but from context I'm assuming that it does the same thing on middle click that Next/Back in the History menu (ie: append tab at end with focus)
Attachment #229647 - Flags: ui-review?(beltzner) → ui-review+
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
Comment on attachment 229647 [details] [diff] [review]
Patch

It calls the exact same function as the graphical home button on the toolbar. So yes, it does append the tab at the end with focus.
Attachment #229647 - Flags: review?(bugs.mano)
Comment on attachment 229647 [details] [diff] [review]
Patch

>Index: browser/base/content/browser-menubar.inc
>===================================================================
\
>                 <menuitem label="&historyHomeCmd.label;"
>-                          command="Browser:Home"
>-                          key="historyHome"/>
>+                          oncommand="BrowserHomeClick(event);"
>+                          onclick="checkForMiddleClick(this, event);"
>+                          key="goHome"/>
>                 <menuseparator/>

BrowserHomeClick is expecting a mouse event, see the way we handle this for the home button.

Also, make sure you're not regressing pressing enter on the menuitem.
Attachment #229647 - Flags: review?(bugs.mano) → review-
As a matter of fact, the keyboard works great with the menu item. It isn't broken so I don't see how I should fix it.
Attached patch Unbitrotted patch (obsolete) — Splinter Review
This patch is an unbitrotted version of attachment 229647 [details] [diff] [review].  I've tested this with every possible use case, and it doesn't break any existing functionality, and it delivers the middle-click handling to the Home menu item (just like Back and Forward).  Re-requesting mano's take on this.
Assignee: nobody → ehsan.akhgari
Status: NEW → ASSIGNED
Attachment #295641 - Flags: ui-review+
Attachment #295641 - Flags: review?(mano)
Attachment #229647 - Attachment is obsolete: true
Target Milestone: --- → Firefox 3 M11
Comment on attachment 295641 [details] [diff] [review]
Unbitrotted patch

hrm, yeah, sorry. I would bother renaming browserhomeclick to something more generic (and make it support the event==null case; and probably check "button" in event), r=mano either way.
Attachment #295641 - Flags: review?(mano) → review+
Btw, I'm sure 
Assignee: ehsan.akhgari → ventnor.bugzilla
Status: ASSIGNED → NEW
...that Michael could update this patch himself.
Addressed mano's comments in comment 9:
 * Renamed BrowserHomeClick to BrowserGoHome.
 * Modified BrowserGoHome to check the aEvent parameter as mano suggested.

Seeking approval for checkin...
Attachment #295641 - Attachment is obsolete: true
Attachment #295816 - Flags: ui-review+
Attachment #295816 - Flags: review+
Attachment #295816 - Flags: approval1.9?
Attachment #295816 - Flags: approval1.9? → approval1.9+
mozilla/browser/base/content/browser-menubar.inc 1.125
mozilla/browser/base/content/browser.js 1.922
mozilla/browser/base/content/browser.xul 1.402
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
I think this is bug ...

When you Shift+Click home button or History>Home new window open but home pasg(s) not open in the new window if browser.startup.page is not 1.
i expect home page(s) to open when i click the home button 


if browser.startup.page is 0 or 3 new window open with blank tab
if browser.startup.page is 2 new window is open with the last open tab
if browser.startup.page is 1 new window is open with hope page(s) 

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: