Closed Bug 324230 Opened 19 years ago Closed 17 years ago

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

Categories

(Firefox :: Tabbed Browser, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: Peter6, Unassigned)

References

Details

Attachments

(1 file)

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)
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);
Attachment #209199 - Flags: review?(mconnor)
(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?

Summary: Contextmenu in last tab has too many options → Context menu of last (only) tab has too many items
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
(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.
This bug should be WORKSFORME once bug 333023 has been fixed.
Depends on: 333023
Hardware: PC → All
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
Closed: 17 years ago
Resolution: --- → WORKSFORME
Attachment #209199 - Flags: review?(mconnor)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: