Closed Bug 1328010 Opened 7 years ago Closed 7 years ago

List of iframes remains displayed (and blinks) when repeatedly clicking on toolbarbutton in devtools

Categories

(DevTools :: Framework, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: arni2033, Unassigned, Mentored)

References

Details

(Keywords: regression)

Attachments

(1 file)

>>>   My Info:   Win7_64, Nightly 51, 32bit, ID 20160805030444 (2016-08-05)
STR_1:
1. Open devtools
2. Click on iframes toolbarbutton
3. Click on iframes toolbarbutton

AR:  In Step 3 list of iframes blinks and stays displayed
ER:  Either X or Y
 X) List of iframes should hide
 Y) List of iframes shouldn't blink (if you're a fan of bad UI that keeps drop-down menus open)

Note:  Bug 1285229 made it slightly better by fixing Menu API

This is regression from bug 1266419. Regression range:
> https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=3435dd7ad71fe9003bdeee18fd38d815e033beef&tochange=864cdd00360cdf62ea5132a457ee53a17f9e31aa@ Jan Honza Odvarko [:Honza] (PTO: 12/09-01/01):
It seems that this is a regresion caused by your change. Please have a look.
No longer blocks: 1277113
Component: Untriaged → Developer Tools: Framework
I can't seem to reproduce this one.  Please reopen if someone has more details about how to do so.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
>>>   My Info:   Win7_64, Nightly 53, 32bit, ID 20170104030214 (2017-01-04)
Reproducible. I literally can't add anything to comment 0.

Except for, if the blinking is intentional, this isn't a bug.
Flags: needinfo?(jryans)
On OSX, it's not reproducible (menu closes), haven't tried on Windows though. :Honza, can you check if it happens on Windows ?
Flags: needinfo?(jryans) → needinfo?(odvarko)
I can reproduce the problem using STR in comment #0 on Win 10

I agree the list of frames (drop down menu) should hide if the user clicks on the button the second time.
Also, the blinking is not intentional.

Thanks for the report!

Honza
Flags: needinfo?(odvarko)
Attached image list-of-frames.png
Some instructions for anyone who's interested to fix this bug.

1) The 'list of frames' button logic is implemented in toolbox.js file
https://dxr.mozilla.org/mozilla-central/source/devtools/client/framework/toolbox.js

2) The button is built in '_buildFrameButton' method.
https://dxr.mozilla.org/mozilla-central/rev/13603af3862d9583ed2feefb06e0988c2d7fed8c/devtools/client/framework/toolbox.js#1065

You can see that click event is handled by 'this.showFramesMenu' method

3) Showing the drop down (list of frames) is done in showFramesMenu
https://dxr.mozilla.org/mozilla-central/source/devtools/client/framework/toolbox.js#1825

This method should be fixed and:
1) hide the list if visible
2) show the list if not visible

I am also attaching a screenshot showing related piece of the UI (the list of frames button).

Feel free to ask more questions if you are interested to fix this!

Honza
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: