Closed Bug 941226 Opened 7 years ago Closed 7 years ago

[Australis] Subscribe button looks disabled even in pages with feeds, when first added to the panel menu

Categories

(Firefox :: Toolbars and Customization, defect)

28 Branch
x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 28

People

(Reporter: elad, Assigned: Gijs)

References

(Blocks 1 open bug)

Details

(Whiteboard: [Australis:P1])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release)
Build ID: 20131120062258

Steps to reproduce:

Go to gmail, which has a feed.
open the Australis menu.



Actual results:

Subscribe button appears disabled, but clicking on it does bring you to the subscription page


Expected results:

It should look enabled in pages with feeds.
Elad, can you check to see if the button has disabled="false" set on it?
Flags: needinfo?(elad)
Oddly enough, I can't reproduce this bug again. I'll close it for now.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Flags: needinfo?(elad)
Resolution: --- → WORKSFORME
(In reply to Elad Alfassa from comment #2)
> Oddly enough, I can't reproduce this bug again. I'll close it for now.

I suspect I have STR:

1. Close Nightly.
2. Open Nightly. Don't open the menu.
3. Go to gmail.
4. Once gmail has fully loaded, open the menu.

Does that make this problem reappear?
Flags: needinfo?(elad)
(In reply to :Gijs Kruitbosch from comment #3)
> (In reply to Elad Alfassa from comment #2)
> > Oddly enough, I can't reproduce this bug again. I'll close it for now.
> 
> I suspect I have STR:
> 
> 1. Close Nightly.
> 2. Open Nightly. Don't open the menu.
> 3. Go to gmail.
> 4. Once gmail has fully loaded, open the menu.
> 
> Does that make this problem reappear?

Nope.
Flags: needinfo?(elad)
(In reply to Elad Alfassa from comment #4)
> (In reply to :Gijs Kruitbosch from comment #3)
> > (In reply to Elad Alfassa from comment #2)
> > > Oddly enough, I can't reproduce this bug again. I'll close it for now.
> > 
> > I suspect I have STR:
> > 
> > 1. Close Nightly.
> > 2. Open Nightly. Don't open the menu.
> > 3. Go to gmail.
> > 4. Once gmail has fully loaded, open the menu.
> > 
> > Does that make this problem reappear?
> 
> Nope.

Huh, then I don't know. Thanks for checking, and please do reopen if you find STR / see this again. :-)
I can reproduce this reliably.  It happens after first adding the Subscribe button to the toolbar or overflow menu, but stops after Firefox is restarted.  Steps to reproduce:

1) Make sure the Subscribe button is not in the toolbar or overflow panel.
2) Enter customization mode, and add the Subscribe button to the toolbar or panel.
3) Navigate to a page with a feed link.

Expected results: Subscribe button is enabled.
Actual results: Subscribe button appears disabled, though clicking on it works anyway.
Status: RESOLVED → REOPENED
Component: Untriaged → Toolbars and Customization
Ever confirmed: true
Resolution: WORKSFORME → ---
Summary: Subscribe button looks disabled even in pages with feeds → [Australis] Subscribe button looks disabled even in pages with feeds, when first added to the toolbar
Yay for STR! I'll investigate on Monday. Setting needinfo so I don't forget.
Flags: needinfo?(gijskruitbosch+bugs)
Whiteboard: [Australis:P1]
(In reply to Jared Wein [:jaws] from comment #1)
> Elad, can you check to see if the button has disabled="false" set on it?

document.getElementById("feed-button").getAttribute("disabled") in the browser console prints "true".
(In reply to Matt Brubeck (:mbrubeck) from comment #6)
> I can reproduce this reliably.  It happens after first adding the Subscribe
> button to the toolbar or overflow menu, but stops after Firefox is
> restarted.  Steps to reproduce:
> 
> 1) Make sure the Subscribe button is not in the toolbar or overflow panel.
> 2) Enter customization mode, and add the Subscribe button to the toolbar or
> panel.
> 3) Navigate to a page with a feed link.
> 
> Expected results: Subscribe button is enabled.
> Actual results: Subscribe button appears disabled, though clicking on it
> works anyway.

Alright, I'm trying this on Win7, because I don't have a copy of Win8.1 and don't understand how that could influence the bug, but I'm not having any luck reproducing. Here's my exact steps (on a clean profile):

1. Start Firefox. The button is in the palette (not the menupanel, not the toolbar - the customization palette).
2. Open http://edition.cnn.com/ in a new tab. This has a feed.
3. Open Customize Mode in a new tab.
4. Drag the feed button to the navbar, right after the search field.
5. Click the open CNN tab.

For me, when I execute step 5 the feed button becomes enabled.

What am I missing?
Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(mbrubeck)
(In reply to :Gijs Kruitbosch from comment #9)
> 4. Drag the feed button to the navbar, right after the search field.
> 5. Click the open CNN tab.
> 
> For me, when I execute step 5 the feed button becomes enabled.

The bug occurs for me if I drag the button to the menupanel instead of the navbar, in step 4.  (However, the bug continues if I then re-enter customization mode and drag it from the menupanel to the navbar.  This must be why I thought I'd tested both menu and navbar previously.)
Flags: needinfo?(mbrubeck)
(In reply to Matt Brubeck (:mbrubeck) from comment #8)
> document.getElementById("feed-button").getAttribute("disabled") in the
> browser console prints "true".

Curiously, button.getAttribute("disabled") === "true", but button.disabled === false, and button.style.MozBinding == "".

It looks like this button lost its XBL binding, or was never bound in the first place.  updateFeeds is called at the correct time, but when it sets .disabled it just adds an expando property instead of using the XUL property setter.
This is another one of those issues caused by XBL binding madness. Setting the (expando, at that point) when the binding isn't attached breaks it. We had similar problems with e.g. the help button in bug 910851. Just using the attribute will fix it.
Attachment #8339295 - Flags: review?(mdeboer)
Assignee: nobody → gijskruitbosch+bugs
Status: REOPENED → ASSIGNED
Summary: [Australis] Subscribe button looks disabled even in pages with feeds, when first added to the toolbar → [Australis] Subscribe button looks disabled even in pages with feeds, when first added to the panel menu
(In reply to :Gijs Kruitbosch from comment #12)
> Setting the (expando, at that point) when the binding isn't attached breaks it.

Should be:

> Setting the (expando, at that point) property when the binding isn't attached breaks it.


See also comment #11
Comment on attachment 8339295 [details] [diff] [review]
feed button disabled when in Australis menu panel,

Review of attachment 8339295 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM!
Attachment #8339295 - Flags: review?(mdeboer) → review+
remote:   https://hg.mozilla.org/integration/fx-team/rev/a92a5ed04e6a
Whiteboard: [Australis:P1] → [Australis:P1][fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/a92a5ed04e6a
Status: ASSIGNED → RESOLVED
Closed: 7 years ago7 years ago
Resolution: --- → FIXED
Whiteboard: [Australis:P1][fixed-in-fx-team] → [Australis:P1]
Target Milestone: --- → Firefox 28
You need to log in before you can comment on or make changes to this bug.