Closed Bug 1255989 Opened 6 years ago Closed 5 years ago

Cannot drag window from empty space in bookmarks toolbar items when customized to the menubar

Categories

(Firefox :: Toolbars and Customization, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 50
Tracking Status
firefox47 --- wontfix
firefox48 --- verified
firefox49 --- verified
firefox50 --- verified

People

(Reporter: avih, Assigned: dao, Mentored)

References

Details

(Keywords: regression, Whiteboard: [lang=css])

Attachments

(1 file, 1 obsolete file)

First noticed this on first Aurora 47 build on Windows (47.0a2 (2016-03-11)) where I couldn't drag an addon (DownThemAll) window.

Then I noticed I can't drag the Firefox window itself too.

Tried nightly and it did drag.

Then I customized Nightly it as follows:
1. burger -> customize
2. Show/Hide tooblars -> [check] menu bar
3. Show/Hide toolbars -> [check] bookmarks toolbar
4. Drag the bookmark toolbar (which just became visible) to the right side of the menu toolbar (which also just became visible).
5. Exit customize.

6. Try dragging the Firefox from the top of the window (right side of the bookmarks toolbar).

Expected: Firefox window follows the mouse.

Actual: Firefox window doesn't get dragged.

Mozregression pointed to this range:
15:52.78 INFO: Last good revision: be27e36ce427df475b3ff827d8c0258c1c34c5b5
15:52.78 INFO: First bad revision: a67a25a5af7446d8ae9beb453bcfa12be368fcef

Which point to bug 1241275 and bug 1219215, both seem highly relevant.

P.S.
Didn't follow up on the "cannot drag addon window" symptom, but I'm guessing that fixing the reported issue would also fix the addon symptom. I'll report back on this once a fix lands.
Attached image DownThemAll-win.png (obsolete) —
Screenshot of the DownThemAll addon window which cannot be dragged too. No menu, but it does have icons to the left of the the drag-area (which did drag correctly on Aurora 46).
Also, not sure if it's the same bug, but it appears that the same area which cannot be used for drag, also doesn't respond to double-click to toggle window maximize/restore.
This is fixable with some CSS, which should be fairly trivial to infer from bug 1219215. I don't have time to work on it myself right now.
Component: General → Toolbars and Customization
Keywords: regression
Summary: Cannot drag window when menu and bookmark-toolbar enabled and customized → Cannot drag window from empty space in bookmarks toolbar items when customized to the menubar
Adding that on IRC Gijs mentioned that he doesn't intend to address this.

> <Gijs> I think it can be fixed, I don't intend to fix it myself

This is really annoying to whoever is affected by it. My workaround for now is to install a theme, after which drag (or double click) works again at the empty areas of the titlebar. Unfortunately this has other issues, like that it doesn't change color when the window become inactive or the mere fact that a theme has to be installed to fix an issue with Firefox. So overal it's got a great solution IMO.
This can be addressed by adding a selector to this block:

https://dxr.mozilla.org/mozilla-central/rev/6adc822f5e27a55551faeb6c47a9bd8b0859a23b/browser/base/content/browser.css#373-381

that makes the personal-bookmarks item draggable when it is in the tabstoolbar or menubar on Windows (even when no lwtheme is present).

It might also need to adjust the devedition styling if necessary - I haven't thought about it in detail.
Mentor: gijskruitbosch+bugs
Whiteboard: [lang=css]
Thanks for the reference.

I was able to make it work locally by adding the following to <profile>/chrome/userChrome.css:

/* Allow window drag when the bookmarks toolbar is at the titlebar.
 * based on https://bugzilla.mozilla.org/show_bug.cgi?id=1255989#c6
 */
#main-window[tabsintitlebar]:not([customizing]) #personal-bookmarks {
  -moz-window-dragging: drag;
}

I'll post here if I notice any issues with this. I'm guessing there won't be issues since I've been using a theme in the past few weeks which makes it behave like this as far as I understand (from the reference at comment 6), and it's been working well with the theme.

Why is there a difference when using or not using a theme to begin with in this regard?
Version 47.0 released to public channel on June 7th, and Default 47.0 theme updated on June 9th and now I'm experiencing this bug too. I've found I can drag the window from a very small space just to the left of the minimize button, in Windows 7 with Aero enabled.
Dao: you could pick this up?
Flags: needinfo?(dao+bmo)
Attached patch patchSplinter Review
Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Flags: needinfo?(dao+bmo)
Attachment #8765918 - Flags: review?(gijskruitbosch+bugs)
Comment on attachment 8765918 [details] [diff] [review]
patch

>diff --git a/browser/base/content/browser.css b/browser/base/content/browser.css
>--- a/browser/base/content/browser.css
>+++ b/browser/base/content/browser.css
>@@ -238,16 +238,20 @@ toolbar[customizing] > .overflow-button 
> #main-window[tabsintitlebar] #titlebar-buttonbox {
>   position: relative;
> }
> 
> #titlebar-buttonbox {
>   -moz-appearance: -moz-window-button-box;
> }
> 
>+#personal-bookmarks {
>+  -moz-window-dragging: inherit;
>+}
>+

Nit: I'd sooner put this^ here:

>-/* Ensure that empty parts of the bookmarks container can be dragged on OSX, and on other OSes
>- * only when a lwtheme is in use. */
>-%ifdef XP_MACOSX
>-#main-window[tabsintitlebar]:not([customizing]) #personal-bookmarks {
>-%else
>-#main-window[tabsintitlebar]:not([customizing]) #personal-bookmarks:-moz-lwtheme {
>-%endif
>-  -moz-window-dragging: drag;
>-}

instead, rather than in the middle of the titlebar stuff.
Attachment #8765918 - Flags: review?(gijskruitbosch+bugs) → review+
I put it intentionally there, since it currently only makes sense in the CAN_DRAW_IN_TITLEBAR case. I.e. it's useless on Linux.
Pushed by dgottwald@mozilla.com:
https://hg.mozilla.org/integration/fx-team/rev/abdc1a4e7080
Bookmarks toolbar items should inherit -moz-window-dragging from the parent toolbar. r=gijs
https://hg.mozilla.org/mozilla-central/rev/abdc1a4e7080
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 50
No longer blocks: 1241275
Comment on attachment 8729826 [details]
DownThemAll-win.png

If there's still a regression specifically for DownThemAll, please file that separately, assuming this is our fault (might make sense to contact the add-on author first).
Attachment #8729826 - Attachment is obsolete: true
Comment on attachment 8765918 [details] [diff] [review]
patch

Approval Request Comment
[Feature/regressing bug #]: bug 1219215
[User impact if declined]: see comment 0
[Describe test coverage new/current, TreeHerder]: no test coverage
[Risks and why]: fairly isolated CSS-only fix, low risk
[String/UUID change made/needed]: none
Attachment #8765918 - Flags: approval-mozilla-beta?
Attachment #8765918 - Flags: approval-mozilla-aurora?
Bookmarks toolbar - confirmed dragging and double click now work in firefox nightly (without any userChrome.css) - at the same use cases where they were broken previously.

(In reply to Dão Gottwald [:dao] from comment #15)
> If there's still a regression specifically for DownThemAll, please file that
> separately, assuming this is our fault (might make sense to contact the
> add-on author first).

FYI WRT DownThemAll - not fixed so far, but the issue only manifests with their beta/nightly builds (where they use toolbars, while the earlier release version uses a normal window instead). The screenshot I posted was using such nightly build of DownThemAll.

With DownThemAll - I don't know if it's a Firefox issue or not, and I didn't search for a regression window with it, but as far as I can tell it did stop working around the same time when the bookmark toolbar drag issue was introduced.
Comment on attachment 8765918 [details] [diff] [review]
patch

Review of attachment 8765918 [details] [diff] [review]:
-----------------------------------------------------------------

This fixes a regression. Take it in 48 beta 6 and aurora.
Attachment #8765918 - Flags: approval-mozilla-beta?
Attachment #8765918 - Flags: approval-mozilla-beta+
Attachment #8765918 - Flags: approval-mozilla-aurora?
Attachment #8765918 - Flags: approval-mozilla-aurora+
Flags: qe-verify+
I reproduced the issue on Aurora beta 47.0a2 (2016-03-11) using Windows 10 x64, Ubuntu 14.04
I verified that the issue is fixed on Firefox 48 (beta 5) 49 (latest aurora) 50 (latest nightly) running Windows 10 x64, Ubuntu 14.04 x32.

After I changed the theme from "Customize" I noticed that you can't drag window from empty space in bookmarks toolbar. Should I log a bug on this?
Flags: needinfo?(dao+bmo)
(In reply to Cipri from comment #21)
> I reproduced the issue on Aurora beta 47.0a2 (2016-03-11) using Windows 10
> x64, Ubuntu 14.04
> I verified that the issue is fixed on Firefox 48 (beta 5) 49 (latest aurora)
> 50 (latest nightly) running Windows 10 x64, Ubuntu 14.04 x32.
> 
> After I changed the theme from "Customize" I noticed that you can't drag
> window from empty space in bookmarks toolbar. Should I log a bug on this?

Which theme are you testing with? It's expected that the area isn't draggable in the default and the developer/devedition theme. Otherwise it should be draggable (and it is for me, on 48b5 on win10).
Flags: needinfo?(georgiuciprianm)
Yes you are right on 48b5 running windows 10.
The problem is on Ubuntu 14.04 x32. I can't drag the window with a customize theme,(like Space Fantasy) only with default theme. It is normal ?
Flags: needinfo?(georgiuciprianm) → needinfo?(gijskruitbosch+bugs)
Yes, that's expected since we don't draw lightweight themes in the title bar on Linux.
Flags: needinfo?(dao+bmo)
Marking verified based on comment #21 and later.
Status: RESOLVED → VERIFIED
Flags: needinfo?(gijskruitbosch+bugs)
You need to log in before you can comment on or make changes to this bug.