Open Bug 584411 Opened 14 years ago Updated 2 years ago

Moving an app tab does not show the insert pointer in the correct location when normal tabs overflow

Categories

(Firefox :: Tabbed Browser, defect)

x86
Windows 7
defect

Tracking

()

People

(Reporter: kbrosnan, Unassigned)

References

Details

Attachments

(2 files, 2 obsolete files)

Create 3 app tabs
Create enough normal tabs that we start scrolling normal tabs
Try and drag the any of the tabs to behind the last app tab

Pointer is shown either before the last app tab or behind the left scroll button.
Pointer should show behind the last app tab as a valid drop location.

Dropping an app tab behind the last app tab does place it behind the last app tab despite what the pointer shows.
Kevin, which build are you using? IMO this is a dupe of bug 579472.
Attached image Screenshot
It is an edge case that was not fixed by bug 579472.

Mozilla/5.0 (Windows; Windows NT 6.1; WOW64; rv:2.0b3pre) Gecko/20100804 Minefield/4.0b3pre
Attached patch Patch (obsolete) — Splinter Review
Couldn't figure out how to make a test for this. :(
Attachment #470198 - Flags: review?(dao)
Attached patch Patch v2 (obsolete) — Splinter Review
It somehow uploaded an old version of the patch.
Attachment #470198 - Attachment is obsolete: true
Attachment #470199 - Flags: review?(dao)
Attachment #470198 - Flags: review?(dao)
Attached patch Patch v3Splinter Review
Turns out I saved the new patch in a different directory, and therefore managed to upload the old patch twice.

Embarrassing.
Attachment #470199 - Attachment is obsolete: true
Attachment #470200 - Flags: review?(dao)
Attachment #470199 - Flags: review?(dao)
Comment on attachment 470200 [details] [diff] [review]
Patch v3

>+          let tab = this._getDragTargetTab(event);

This is unused.

>+          if (newIndex < this.tabbrowser._numPinnedTabs) {
>             if (ltr)
>               newMargin = tabRect.left - rect.left;
>             else
>               newMargin = rect.right - tabRect.right;
>+          } else {
>+            // When dragging over a non-apptab position, make sure the arrow
>+            // doesn't appear in front of the scroll button.
>+            if (ltr)
>+              newMargin = Math.max(tabRect.left - rect.left, minMargin);
>+            else
>+              newMargin = Math.max(rect.right - tabRect.right, minMargin);
>           }

This seems identical to:

if (ltr)
  newMargin = tabRect.left - rect.left;
else
  newMargin = rect.right - tabRect.right;

if (newIndex >= this.tabbrowser._numPinnedTabs)
  newMargin = Math.max(newMargin, minMargin);
Comment on attachment 470200 [details] [diff] [review]
Patch v3

per comment 7
Attachment #470200 - Flags: review?(dao) → review-
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: