Closed
Bug 610130
Opened 14 years ago
Closed 14 years ago
Doorhanger notifications confused when switching between tabs with different types of doorhangers
Categories
(Toolkit :: General, defect)
Tracking
()
VERIFIED
FIXED
mozilla2.0b9
Tracking | Status | |
---|---|---|
blocking2.0 | --- | betaN+ |
People
(Reporter: asqueella, Assigned: adw)
References
Details
(Whiteboard: [doorhanger])
Attachments
(3 files, 2 obsolete files)
1. Open http://gavinsharp.com/tmp/geo.html (a geolocation doorhanger should appear)
2. Open http://quicknote.mozdev.org/installation.html
3. Click Install QuickNote 0.6.0.5 (an addon installation doorhanger should appear)
4. switch back to gavinsharp.com using keyboard (Cmd+alt+left on Mac)
-> the doorhanger notification appears behind tabs anchored to the top-left of the window (screenshot #1)
5. switch back to quicknote.mozdev.org
-> the doorhanger notification becomes as wide as the screen (screenshot #2)
The notifications are confused from this moment until a restart.
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:2.0b8pre) Gecko/20101106 Firefox/4.0b8pre
Reporter | ||
Comment 1•14 years ago
|
||
Updated•14 years ago
|
blocking2.0: --- → ?
Updated•14 years ago
|
blocking2.0: ? → betaN+
Updated•14 years ago
|
Product: Firefox → Toolkit
QA Contact: general → general
Comment 2•14 years ago
|
||
So part of the issue is that we use display:none to hide the icons on tab switch, and the showing of the anchor isn't guaranteed to happen before we try to show the popup (popups don't like being anchored to display:none elements).
Using visibility: collapse to do the hiding solves part of that problem, but it still results in the popup being positioned at the wrong spot, because the we use the anchor image's original position rather than the post-hiding position. I guess we could work around that by positioning all the icons so that they're in the same place all of the time...
Assignee | ||
Comment 3•14 years ago
|
||
Making sure the popup is hidden before changing its anchor seems to work. In my testing both icon images actually did have a display of -moz-box before the popup was shown, not none.
I noticed that with Nickolay's example the tab you choose second is the problem. Like, if you do the STR in comment 0, the gavinsharp.com doorhanger position is off, but then if you keyboard to an unrelated tab, back to gavinsharp.com, then back to quicknote.mozdev.org, the gavinsharp.com doorhanger is fine while the quicknote doorhanger position is off.
Assignee | ||
Comment 4•14 years ago
|
||
Comment on attachment 494749 [details] [diff] [review]
patch
This isn't right, the test fails.
Attachment #494749 -
Flags: review?(gavin.sharp)
Comment 5•14 years ago
|
||
Here is the patch that I was playing with, fwiw.
Assignee | ||
Comment 6•14 years ago
|
||
Gavin, how's this? It still hides the popup first if it's shown but in a more correct way. I had to modify one test to get it to pass, because an extra popuphidden is fired when the popup is removed, and the harness expects only one popuphidden event to be fired for each test.
Attachment #494749 -
Attachment is obsolete: true
Attachment #494899 -
Flags: review?(gavin.sharp)
Comment 7•14 years ago
|
||
Comment on attachment 494899 [details] [diff] [review]
hide popup first patch 2
>diff --git a/toolkit/content/PopupNotifications.jsm b/toolkit/content/PopupNotifications.jsm
> if (this.isPanelOpen && this._currentAnchorElement == anchorElement)
> return;
>+ // If the panel is already open but we're changing anchors, we need to hide
>+ // it first. Otherwise it can appear in the wrong spot.
>+ if (this.isPanelOpen && this._currentAnchorElement != anchorElement)
>+ this._hidePanel();
You can just call _hidePanel() unconditionally (it never throws) after the first isPanelOpen check, r=me with that.
Attachment #494899 -
Flags: review?(gavin.sharp) → review+
Updated•14 years ago
|
Whiteboard: [has review][n
Updated•14 years ago
|
Whiteboard: [has review][n → [has review][needs new patch]
Assignee | ||
Comment 9•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [has review][needs new patch]
Target Milestone: --- → mozilla2.0b9
Updated•14 years ago
|
Attachment #494755 -
Attachment is obsolete: true
Updated•14 years ago
|
Flags: in-testsuite+
![]() |
||
Updated•14 years ago
|
No longer blocks: doorhanger
You need to log in
before you can comment on or make changes to this bug.
Description
•