Moving a panel by clicking and dragging on titlebar broken




Drag and Drop
8 years ago
2 years ago


(Reporter: Susan Crayne, Unassigned)



1.9.2 Branch
Windows Vista
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)



(2 attachments, 1 obsolete attachment)



8 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2b5) Gecko/20091204 Firefox/3.6b5 (.NET CLR 3.5.30729)

We have developed an extension called gliider, based on a popup.  We have created the ability to drag the popup by the tab, which is an invisible titlebar XUL element. In version 3.5.6 (Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: Gecko/20091201 Firefox/3.5.6 (.NET CLR 3.5.30729)), the dragging works as expected.  In Firefox 3.6b5, the popup follows the mouse, but when the mouse button is released, the popup jumps back to its original location.  I will attach an xpi, as well as a few specific files where the relevant code is located.  This also happens on Mac OS/X, w. version 3.6b5

Reproducible: Always

Steps to Reproduce:
1.Install gliider.xpi.  If gliider panel is not showing, click on the blue button on the toolbar
2.Mouse down on the tab at the top of the browser.  Drag the panel to a new location, and release the mouse
Actual Results:  
Panel jumps back to its original location

Expected Results:  
Panel should stay at the location where the mouseup occurred.

Comment 1

8 years ago
Created attachment 419059 [details]
xpi, 3 source files, readme

The attachment contains a complete xpi to install to demonstrate the bug, plus three source files which contain code relevant to the bug, plus a readme


8 years ago
Version: unspecified → 3.6 Branch
This is reproducible with latest trunk on Windows Vista.
Component: General → XUL
Product: Firefox → Core
QA Contact: general → xptoolkit.widgets
Version: 3.6 Branch → 1.9.2 Branch
Keywords: regression, regressionwindow-wanted
Component: XUL → Drag and Drop
QA Contact: xptoolkit.widgets → drag-drop
Regression range:
Keywords: regressionwindow-wanted

Comment 4

8 years ago
Short of a fix, we at gliider would really appreciate any information available about a workaround. The feature which allows users to move the gliider panel by dragging it is very important.
Maybe you can ask it on the groups or forums:

Comment 6

8 years ago
Created attachment 423047 [details] [diff] [review]
use menupopupframe's moveTo instead of widget's move

This patch does two things:
- use the menupopup's MoveTo rather than the widget's Move in the titlebar frame. This ensures that the new screen position is cached properly. 
- adds back the aIsMove argument to SetPopupPosition I had removed in an earlier bug. It's needed when moving a popup so that it doesn't flip around when hitting the edge of the screen.

This patch also includes a test for bug 538585 (the mac specific part of the test).
Assignee: nobody → enndeakin
Ever confirmed: true
Attachment #423047 - Flags: review?(roc)

Comment 7

8 years ago
Thank you for addressing this bug so promptly.  Please let me know if you would like me to test the fix.  Do you have any idea about which Firefox version might contain this fix?

Comment 8

8 years ago
You should be able to test with the builds at
Comment on attachment 423047 [details] [diff] [review]
use menupopupframe's moveTo instead of widget's move

+  if (aIsMove && mPopupType == ePopupTypePanel && !mInContentShell)
+    hFlip = vFlip = PR_FALSE;

{} around the if body
Attachment #423047 - Flags: review?(roc) → review+

Comment 10

8 years ago
I downloaded from this site: and tested on Windows Vista and found that I could not move the window horizontally at all.

I downloaded the latest nightly from (Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.3a1pre) Gecko/20100124 Minefield/3.7a1pre (.NET CLR 3.5.30729)).  I found that horizontal dragging worked, except that if I dragged the gliider window about three quarters the width of the Firefox window to the left.  Then the gliider window snapped back to the right, and continued this behavior with subsequent drags, until I restarted Firefox.

Comment 11

8 years ago
I think the code being run in the mousedown event listener you have on the <titlebar> in interfering in some way. Removing it makes it work fine.

If you still think there's a bug, a reduced testcase is needed that contains just the part that doesn't work.

Comment 12

8 years ago
Last Resolved: 8 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Depends on: 543760

Comment 13

8 years ago
We are creating a reduced testcase.  The test build page is no longer there -- what should we test against?

Comment 14

8 years ago
You can use nightly builds available at

Comment 15

8 years ago
Created attachment 429153 [details]
glider.xpi illustrates the problem with dragging popup with panel
Attachment #419059 - Attachment is obsolete: true

Comment 16

8 years ago
If you drag the object by the blue tab to the left in Firefox 5.6.5, you are allowed to drag past the left border of the browser window.

In Firefox 3.7a2pre, if you drag the object past the left border of the parent window, the width of the object changes to become the width of the browser window, so that you can no longer drag the object.
Resolution: FIXED → ---

Comment 17

4 years ago
Is this bug still a problem?

Comment 18

4 years ago
I am no longer working on the project that has this problem, and cannot run the code.  That doesn't mean it's gone.


2 years ago
Assignee: enndeakin → nobody
You need to log in before you can comment on or make changes to this bug.