Context menu of last (only) tab has too many items

RESOLVED WORKSFORME

Status

()

Firefox
Tabbed Browser
RESOLVED WORKSFORME
12 years ago
10 years ago

People

(Reporter: Peter6, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
the following items in the contextmenu in the last tab should be grayed out:

Reload all tabs (There is just 1 tab)
Close other tabs (There are no other tabs)
Close tab (The [X] on the tab was removed, so we shouldn't allow close here either)

Comment 1

12 years ago
in tabbrowser.xml
      <method name="updatePopupMenu">
        <parameter name="aPopupMenu"/>
        <body>
          <![CDATA[
            this.mContextTab = document.popupNode;
            var disabled = this.mPanelContainer.childNodes.length == 1;
            var menuItems = aPopupMenu.getElementsByAttribute("tbattr", "tabbrowser-multiple");
            for (var i = 0; i < menuItems.length; i++)
              menuItems[i].disabled = disabled;
          ]]>
        </body>
      </method>


-  menuItems[i].disabled = disabled;
+  menuItems[i].setAttribute("disabled", disabled);

Comment 2

12 years ago
Created attachment 209199 [details] [diff] [review]
Comment 1 as a patch
Attachment #209199 - Flags: review?(mconnor)

Comment 3

12 years ago
(In reply to comment #1)
> in tabbrowser.xml
(snip)
> -  menuItems[i].disabled = disabled;
> +  menuItems[i].setAttribute("disabled", disabled);

This reverts an intended change made by Bug 288986. Is it OK?

Updated

12 years ago
Summary: Contextmenu in last tab has too many options → Context menu of last (only) tab has too many items

Comment 4

12 years ago
CCing Aaron. Currently some useless menu items aren't getting disabled which seems bad for usability, but is fixing this going to have an accessibility impact?
Why would it have an accessibility impact? If the items are useless, they're useless, doesn't matter how they're activacted...
No longer blocks: 308396

Comment 6

12 years ago
(In reply to comment #5)
> Why would it have an accessibility impact? If the items are useless, they're
> useless, doesn't matter how they're activacted...
 
Just double-checking, based on comment 3.
(In reply to comment #6)
> (In reply to comment #5)
> > Why would it have an accessibility impact? If the items are useless, they're
> > useless, doesn't matter how they're activacted...
> 
> Just double-checking, based on comment 3.

Ah, I see, I hadn't looked at the patch. The change in that bug is incorrect - the menuitem binding doesn't extend general.xml, nor does it have a disabled property of it's own.  Maybe it should do one or the other instead of just using the attribute here, though.

Comment 8

12 years ago
This bug should be WORKSFORME once bug 333023 has been fixed.
Depends on: 333023
Hardware: PC → All

Comment 9

11 years ago
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a7) Gecko/200708021010 GranParadiso/3.0a7

With bug 333023 fixed, this issue has indeed become WORKSFORME.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → WORKSFORME

Updated

10 years ago
Attachment #209199 - Flags: review?(mconnor)
You need to log in before you can comment on or make changes to this bug.