Closed Bug 1791393 Opened 2 years ago Closed 1 year ago

Drag and drop icon stuck inside the tabbar after dragging tabs

Categories

(Firefox :: Tabbed Browser, defect)

defect

Tracking

()

VERIFIED FIXED
112 Branch
Tracking Status
firefox-esr102 --- wontfix
firefox105 --- wontfix
firefox106 --- wontfix
firefox107 --- wontfix
firefox110 --- wontfix
firefox111 --- wontfix
firefox112 --- verified

People

(Reporter: bmaris, Assigned: Oriol)

References

Details

(Whiteboard: Fixed by bug 1808787)

Attachments

(2 files)

Found in

  • Firefox 105.0

Affected versions

  • Firefox 105.0
  • Firefox 106.0a1
  • Firefox 102.3.0esr

Tested platforms

  • Affected platforms: Windows 10, macOS 11, Ubuntu 18.04
  • Unaffected platforms: none

Steps to reproduce

  1. Open at least two tabs
  2. Select the tabs
  3. Hold ctrl (mac - alt/option) and drag the tabs to the far left
  4. Release the tabs

Expected result

  • Drag drop indicator is displayed before dropping the tabs and disappears after dropping them.

Actual result

  • Drag drop indicator is stuck in the tab bar. It will disappear if one tab is moved inside the tabbar though.

Regression range

Has STR: --- → yes

I can't reproduce on 110 on macOS. Are you still seeing this? If so can you attach a screencast - maybe I'm misunderstanding some steps?

Flags: needinfo?(bogdan.maris)
Attached image Tab drag icon stuck.gif

(In reply to :Gijs (he/him) from comment #1)

I can't reproduce on 110 on macOS. Are you still seeing this? If so can you attach a screencast - maybe I'm misunderstanding some steps?

I can still reproduce this issue on W10 and Mac13 on both 110.0 and Latest Nightly. I've attached a gif for better understanding the steps, hope this helps.

Flags: needinfo?(bogdan.maris)
Flags: needinfo?(gijskruitbosch+bugs)

I think this got fixed on nightly by bug 1808787. Could you confirm?

Depends on: 1808787
Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(bogdan.maris)

Seems fixed, but on the other hand, I now see the indicator going to the end of the tabbar when dragging to the beginning before the 1st tab.

Probably because

      if (!tab) {
        return this.allTabs.length;
      }

should be something like

      if (!tab) {
        let firstTab = this.allTabs[0];
        let isBeforeFirstTab = RTL_UI
          ? event.screenX > firstTab.screenX + firstTab.getBoundingClientRect().width
          : event.screenX < firstTab.screenX;
        if (isBeforeFirstTab) {
          return 0;
        }
        return this.allTabs.length;
      }

(In reply to Oriol Brufau [:Oriol] from comment #4)

Seems fixed, but on the other hand, I now see the indicator going to the end of the tabbar when dragging to the beginning before the 1st tab.

Probably because

      if (!tab) {
        return this.allTabs.length;
      }

should be something like

      if (!tab) {
        let firstTab = this.allTabs[0];
        let isBeforeFirstTab = RTL_UI
          ? event.screenX > firstTab.screenX + firstTab.getBoundingClientRect().width
          : event.screenX < firstTab.screenX;
        if (isBeforeFirstTab) {
          return 0;
        }
        return this.allTabs.length;
      }

That seems reasonable. Would you like to attach a patch? :-)

Flags: needinfo?(bogdan.maris) → needinfo?(oriol-bugzilla)

The reason for this bug was that in

    on_dragleave(event) {
      this._dragTime = 0;

      // This does not work at all (see bug 458613)
      var target = event.relatedTarget;
      while (target && target != this) {
        target = target.parentNode;
      }
      if (target) {
        return;
      }

      this._tabDropIndicator.hidden = true;
      event.stopPropagation();
    }

event.relatedTarget would be the .tab-drop-indicator, so target would end up being #tabbrowser-tabs and the early return would prevent hiding the indicator.

My patch added .tab-drop-indicator { pointer-events: none; } which prevents the indicator from becoming the related target.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED

(In reply to :Gijs (he/him) from comment #5)

That seems reasonable. Would you like to attach a patch? :-)

Filed bug 1820912.

Flags: needinfo?(oriol-bugzilla)

Thanks!

Assignee: nobody → oriol-bugzilla
Whiteboard: Fixed by bug 1808787
Target Milestone: --- → 112 Branch

I am not sure but did the fix from bug 1808787 removed the indicator all together (with the exception the case from bug 1820912)?

If yes then I'll close this bug since I can't run into this issue anymore (as tested in latest Nightly from today)

Flags: needinfo?(oriol-bugzilla)

(In reply to Bogdan Maris [:bogdan_maris], Desktop QA from comment #9)

I am not sure but did the fix from bug 1808787 removed the indicator all together (with the exception the case from bug 1820912)?

I still see the indicator while dragging the tab between other tabs. Can you clarify when you aren't seeing it anymore?

Flags: needinfo?(bogdan.maris)

Yeah, the indicator should still be shown when needed, I don't really get comment 9.

Flags: needinfo?(oriol-bugzilla)

Gah, false alarm. I was dragging tabs without holding the ctrl/option key as I should have.
I rechecked on latest Nightly and I can confirm that the indicator appears and this particular issue is no longer reproducible across platforms (windows 10, macOS 13 and Ubuntu 22.04). Closing as verified fixed.

Status: RESOLVED → VERIFIED
Flags: needinfo?(bogdan.maris)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: