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

VERIFIED FIXED in Firefox 48

Status

()

VERIFIED FIXED
3 years ago
2 years ago

People

(Reporter: avih, Assigned: dao, Mentored)

Tracking

({regression})

Trunk
Firefox 50
regression
Points:
---
Bug Flags:
qe-verify +

Firefox Tracking Flags

(firefox47 wontfix, firefox48 verified, firefox49 verified, firefox50 verified)

Details

(Whiteboard: [lang=css])

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

3 years ago
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.
(Reporter)

Comment 2

3 years ago
Created attachment 8729826 [details]
DownThemAll-win.png

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).
(Reporter)

Comment 3

3 years ago
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.

Comment 4

3 years ago
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
(Reporter)

Comment 5

3 years ago
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.

Comment 6

3 years ago
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]
(Reporter)

Comment 7

3 years ago
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?

Comment 8

2 years ago
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)
(Assignee)

Comment 10

2 years ago
Created attachment 8765918 [details] [diff] [review]
patch
Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Flags: needinfo?(dao+bmo)
Attachment #8765918 - Flags: review?(gijskruitbosch+bugs)

Comment 11

2 years ago
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+
(Assignee)

Comment 12

2 years ago
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.

Comment 13

2 years ago
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

Comment 14

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/abdc1a4e7080
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox50: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 50
(Assignee)

Updated

2 years ago
No longer blocks: 1241275
(Assignee)

Comment 15

2 years ago
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
(Assignee)

Comment 16

2 years ago
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?
(Reporter)

Comment 17

2 years ago
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.

Updated

2 years ago
status-firefox47: --- → wontfix
status-firefox49: --- → affected
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+

Updated

2 years ago
Flags: qe-verify+
 https://hg.mozilla.org/releases/mozilla-aurora/rev/128eff0a581f
status-firefox49: affected → fixed

Comment 21

2 years ago
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)

Comment 22

2 years ago
(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)

Comment 23

2 years ago
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 ?

Updated

2 years ago
Flags: needinfo?(georgiuciprianm) → needinfo?(gijskruitbosch+bugs)
(Assignee)

Comment 24

2 years ago
Yes, that's expected since we don't draw lightweight themes in the title bar on Linux.
Flags: needinfo?(dao+bmo)

Comment 25

2 years ago
Marking verified based on comment #21 and later.
Status: RESOLVED → VERIFIED
status-firefox48: fixed → verified
status-firefox49: fixed → verified
status-firefox50: fixed → verified
Flags: needinfo?(gijskruitbosch+bugs)
You need to log in before you can comment on or make changes to this bug.