Settings panel does not close on clicking the cogwheel again

RESOLVED FIXED in Firefox 40

Status

Hello (Loop)
Client
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: designakt, Assigned: mikedeboer)

Tracking

unspecified
mozilla40
Points:
1

Firefox Tracking Flags

(firefox40 fixed)

Details

Attachments

(2 attachments)

(Reporter)

Description

3 years ago
Created attachment 8593811 [details]
Screen Shot 2015-04-17 at 10.44.32.png

Buttons are expected to work as a toggle in such cases.
Interesting, the on-mouse out appears to have been lost as well. I'm pretty sure we landed a patch for that a while ago.

Mike, any ideas?
Flags: needinfo?(mdeboer)
(Assignee)

Comment 2

3 years ago
(In reply to Mark Banner (:standard8) from comment #1)
> Interesting, the on-mouse out appears to have been lost as well. I'm pretty
> sure we landed a patch for that a while ago.
> 
> Mike, any ideas?

I removed the onmouseout behavior, because the dropdowns now behave properly when the panel looses focus.

Clicking the cog calls `showDropdownMenu`, which should be `toggleDropdownMenu`.
Flags: needinfo?(mdeboer)
(Assignee)

Updated

3 years ago
Assignee: nobody → mdeboer
Status: NEW → ASSIGNED
Iteration: --- → 40.2 - 27 Apr
Points: --- → 1
OS: Mac OS X → All
Hardware: x86 → All
(Assignee)

Comment 3

3 years ago
I'm puzzled here. When I change the call to `toggleDropdownMenu`, it never toggles to close. When I inspect the state, it keeps showing `showMenu == false`, instead of `true`, even though it's visibly showing!
Also, when I inspect the entire state, it only shows the `showMenu` property, _not_ the `doNotDisturb` property as well.

Mark, Nico, do you know about something React-y that I'm not aware of that might easily explain this?
Flags: needinfo?(standard8)
Flags: needinfo?(nperriault)
(In reply to Mike de Boer [:mikedeboer] from comment #3)
> Mark, Nico, do you know about something React-y that I'm not aware of that
> might easily explain this?

The issue is _onBodyClick is always being fired because its a click on the document body.

It also gets fired first, so I'm guessing preventDefault() won't avoid the bad behavior.
Flags: needinfo?(standard8)
Flags: needinfo?(nperriault)
(Assignee)

Comment 5

3 years ago
(In reply to Mark Banner (:standard8) from comment #4)
> The issue is _onBodyClick is always being fired because its a click on the
> document body.
> 
> It also gets fired first, so I'm guessing preventDefault() won't avoid the
> bad behavior.

This doesn't appear to be the problem. In fact, _onBodyClick would _hide_ the dropdown, since it sets the state to `false`.
Flags: needinfo?(standard8)
Flags: needinfo?(nperriault)
Information provided over IRC, clearing needinfo.
Flags: needinfo?(nperriault)
(Assignee)

Comment 7

3 years ago
Created attachment 8593994 [details] [diff] [review]
Patch v1: ignore body clicks on dropdown menu buttons
Flags: needinfo?(standard8)
Attachment #8593994 - Flags: review?(standard8)
Attachment #8593994 - Flags: review?(standard8) → review+
https://hg.mozilla.org/mozilla-central/rev/9c3072b75cc0
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox40: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.