Closed
Bug 304499
Opened 19 years ago
Closed 19 years ago
Bookmark all Tabs menuitem not properly enabled / disabled
Categories
(Firefox :: Bookmarks & History, defect)
Tracking
()
VERIFIED
FIXED
Firefox1.5
People
(Reporter: bangbang023, Assigned: vlad)
Details
(Keywords: fixed1.8)
Attachments
(2 files, 2 obsolete files)
5.11 KB,
patch
|
asaf
:
review+
asa
:
approval1.8b4+
|
Details | Diff | Splinter Review |
1.59 KB,
patch
|
asa
:
approval1.8rc1+
|
Details | Diff | Splinter Review |
The "Bookmark all tabs..." option is not disabled at startup when using
about:blank as homepage. It is properly disabled when one tab is open as soon as
a page is loaded.
Comment 1•19 years ago
|
||
An inverse (but likely related) problem is that if a user:
- opens a new browser
- opens links as tabs in background
the menu item is *disabled* when it should be enabled.
Summary: Bookmark all Tabs is not disabled at startup as should be → Bookmark all Tabs menuitem not properly enabled / disabled
Comment 2•19 years ago
|
||
The code which updates the disabled state of the command is living in
onLocationChange, pretty bogus for many cases...
Severity: normal → major
Flags: blocking1.8b4?
Target Milestone: --- → Firefox1.5
Updated•19 years ago
|
Flags: blocking1.8b4? → blocking1.8b4+
Assignee | ||
Comment 4•19 years ago
|
||
Gonna grab this from ben (who probably doesn't even know he has it ;)
Assignee: beng → vladimir
Comment 5•19 years ago
|
||
Speaking of things in the background: open some tabs, change to one to enable
Bookmark All Tabs, then right-click that tab and choose "Close Other Tabs" and
Bookmark All Tabs remains enabled.
Comment 6•19 years ago
|
||
What you really want here is some notification (i.e. events) from tabbrowser on
removal and addition of tabs.
Another approach would be to use onpopupshowing but that wouldn't play nice w/
the keyboard shortcut (unless you're doing the same checks inside the oncommand
code as well.).
Assignee | ||
Comment 7•19 years ago
|
||
I think adding more events is too risky at this point; checking in
onpopupshowing and also fudging a bit if we get into the command via a keyboard
shortcut as Mano suggested seems to get the job done.
Attachment #194120 -
Flags: review?(bugs.mano)
Comment 8•19 years ago
|
||
Comment on attachment 194120 [details] [diff] [review]
bookmark-all-tabs.patch
- The tabbar context menu isn't fixed here, you need to apply the
onpopupshowing attribute on it as well (dynamically, in
|addBookmarkMenuitems()|).
>+ // we only disable the menu item on onpopupshowing; if we get
>+ // here via keyboard shortcut, we need to pretend like
>+ // nothing happened if we have no tabs
>+ if ((!browsers || browsers.length == 1) && aBookmarkAllTabs)
>+ return;
Isn't it enough to check for |aBookmarkAllTabs| here?
- Mac only, the menuitem is enabled in non-browser windows (or, when no window
is open), you might also get a JS error when opening the bookmarks menu; please
disable the command if |getBrowser()| returns null.
Attachment #194120 -
Flags: review?(bugs.mano) → review-
Comment 9•19 years ago
|
||
eek, ignore the part on |aBookmarkAllTabs|.
Assignee | ||
Comment 10•19 years ago
|
||
Updated patch with comments (and irc comments) incorporated
Attachment #194120 -
Attachment is obsolete: true
Attachment #194132 -
Flags: review?(bugs.mano)
Assignee | ||
Comment 11•19 years ago
|
||
Blah, fixed for real this time.. I misunderstood when we created those menu
items.
Attachment #194132 -
Attachment is obsolete: true
Attachment #194135 -
Flags: review?(bugs.mano)
Assignee | ||
Updated•19 years ago
|
Attachment #194132 -
Flags: review?(bugs.mano)
Comment 12•19 years ago
|
||
Comment on attachment 194135 [details] [diff] [review]
fixed for reals
> function UpdateBookmarkAllTabsMenuitem()
> {
> var tabbrowser = getBrowser();
>- var numTabs = tabbrowser.tabContainer.childNodes.length;
>+ var numtabs = 0;
>+ if (tabbrowser)
>+ numTabs = tabbrowser.tabContainer.childNodes.length;
s/numtabs/numTabs in declaration.
>+ // set up the bookmarkAllTabs menu item correctly when the menu popup is shown
>+ tabMenu.addEventListener("popupshowing", function(e) { UpdateBookmarkAllTabsMenuitem(); }, false);
The addEventListner call can be simplied to:
>+ tabMenu.addEventListener("popupshowing", UpdateBookmarkAllTabsMenuitem, false);
r=mano with those fixed.
Attachment #194135 -
Flags: review?(bugs.mano) → review+
Assignee | ||
Updated•19 years ago
|
Attachment #194135 -
Flags: approval1.8b4?
Comment 13•19 years ago
|
||
Can we get this landed on the trunk, resolved as fixed and verified, before we
take on the branch?
Assignee | ||
Comment 14•19 years ago
|
||
checked in on trunk
Updated•19 years ago
|
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 15•19 years ago
|
||
Verified with Windows trunk build:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20050830
Firefox/1.6a1
Status: RESOLVED → VERIFIED
Updated•19 years ago
|
Attachment #194135 -
Flags: approval1.8b4? → approval1.8b4+
Comment 17•19 years ago
|
||
The browser.js part of this patch that prevents the shortcut key from working
when it shouldn't didn't make the branch for some reason. Not a big deal I
guess, it seems to behave the same as "Add Bookmark".
Assignee | ||
Comment 18•19 years ago
|
||
Huh; I wonder if I checked in the wrong version of the patch to the trunk.
This is just the second half of the above patch; it's been baking on the trunk
for a while.
Attachment #198602 -
Flags: approval1.8b5?
Comment 19•19 years ago
|
||
Comment on attachment 198602 [details] [diff] [review]
just the keyboard accelerator fix
moving request to 1.8rc1 since 1.8b5 has shipped.
Attachment #198602 -
Flags: approval1.8b5? → approval1.8rc1?
Updated•19 years ago
|
Attachment #198602 -
Flags: approval1.8rc1? → approval1.8rc1+
You need to log in
before you can comment on or make changes to this bug.
Description
•