MrOtherGuy / firefox-csshacks

Collection of userstyles affecting the browser
Mozilla Public License 2.0
3.19k stars 312 forks source link

Cannot drag tab to bookmarks toolbar when using autohide_bookmarks_toolbar.css #259

Open ghost opened 1 year ago

ghost commented 1 year ago

While using the 'autohide_bookmarks_toolbar.css' hack, it seem you can no longer drag a tab to the bookmarks toolbar to bookmark it like you used to. This applies to re-ordering bookmarks in the toolbar as well.

The issue is that the bookmarks toolbar no longer seems to register that you're hovering over it and so hides itself too quickly. Here's a screencast to demonstrate:

Peek 2023-02-22 14-41

I'm using Librewolf v110.0.

MrOtherGuy commented 1 year ago

Something happened in Firefox 110 that causes this, and similarly autohide sidebar hides when you try to drag stuff inside sidebar. This problem only seems to affect Linux though, so I'm pretty confident that it cannot be fixed with CSS, instead it sounds like it is caused by how Firefox deals with :hover pseudo-class during drag-sessions.

Like if you open this demo https://yari-demos.prod.mdn.mozit.cloud/en-US/docs/Web/CSS/:hover/_sample_.basic_example.html

There's light-blue box with a link inside it (link isn't important, might as well be just plain text). When hovered, the box becomes orange.

Now, try to start a drag session dragging the link inside the box.

On Windows the :hover state does not change at all while the drag-session is active. So the box stays orange because your cursor was hovering the box when dragging started. And it stays orange no matter where the cursor actually is during the drag session - as if the box was hovered the whole time.

But on Linux the box always loses its :hover state when dragging starts even if the cursor is still within the box's bounds.

I think this is an actual bug in Firefox because I doubt drag-handling change is intentional. Whether or not it's intentional, I doubt that there is anything that can be done to this with CSS.

ghost commented 1 year ago

Good to know, thanks @MrOtherGuy. Feel free to close this if you like. I'll try to find a bug report for this in Firefox...

MrOtherGuy commented 1 year ago

I was able to use mozregression to trace the issue to bug 1798131

I don't have time to look into it any more right now, but that's a start.

MrOtherGuy commented 1 year ago

FYI: I filed bug 1818517 for this.