Open Bug 536625 Opened 10 years ago Updated 4 years ago

Moving a panel by clicking and dragging on titlebar broken


(Core :: DOM: Drag & Drop, defect, major)

1.9.2 Branch
Windows Vista
Not set





(Reporter: susancrayne, Unassigned)



(Keywords: regression)


(2 files, 1 obsolete file)

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.
Attached file xpi, 3 source files, readme (obsolete) —
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
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
Component: XUL → Drag and Drop
QA Contact: xptoolkit.widgets → drag-drop
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.
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)
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?
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+
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.
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.
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Depends on: 543760
We are creating a reduced testcase.  The test build page is no longer there -- what should we test against?
You can use nightly builds available at
Attachment #419059 - Attachment is obsolete: true
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 → ---
Is this bug still a problem?
I am no longer working on the project that has this problem, and cannot run the code.  That doesn't mean it's gone.
Assignee: enndeakin → nobody
You need to log in before you can comment on or make changes to this bug.