Accidentally dragging a single tab moves it to the right edge of the tab bar.

RESOLVED FIXED in seamonkey2.5

Status

SeaMonkey
Tabbed Browser
--
minor
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Stefan A. Möller, Assigned: Philip Chee)

Tracking

unspecified
seamonkey2.5
x86
Windows 2000

SeaMonkey Tracking Flags

(seamonkey2.3 fixed, seamonkey2.4 fixed)

Details

Attachments

(2 attachments)

(Reporter)

Description

6 years ago
User-Agent:       Mozilla/5.0 (Windows NT 5.0; rv:2.0.1) Gecko/20110608 Firefox/4.0.1 SeaMonkey/2.1
Build Identifier: Mozilla/5.0 (Windows NT 5.0; rv:2.0.1) Gecko/20110608 Firefox/4.0.1 SeaMonkey/2.1

If you have only one single tab opened, and then accidentally drag this tab a little bit, it jumps to the right edge of the tab bar.

Reproducible: Always

Steps to Reproduce:
1. Set browser.tabs.autoHide to "false".
2. Close all but one tab.
3. Grab this tab with the mouse and move it a little bit in any direction, a few pixels are enough.
4. Release the mouse button.

Actual Results:  
Tab jumps to the right edge of the tab bar.

Expected Results:  
Tab should not move.
(Assignee)

Comment 1

6 years ago
Eeek.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 2

6 years ago
[13:01:28]<RattyAway>NeilAway: eek Bug 666246 - Accidentally dragging a single tab moves it to the right edge of the tab bar.
[13:01:33]<RattyAway>How do I fix this?
[13:10:24]<NeilAway>RattyAway: check for aDestIndex != aSrcIndex perhaps
[13:11:59]<NeilAway>RattyAway: actually, in moveTabTo, just changing the check to aDestIndex > aSrcIndex seems to fix it for me
(Assignee)

Comment 3

6 years ago
Created attachment 548092 [details] [diff] [review]
Patch v1.0 Return early if source index == destination index

> in moveTabTo, just changing the check to aDestIndex > aSrcIndex seems to fix it for me
Didn't work for me. I looked at the Firefox implementation and it returns early when the destination position is the same as the source position. Also nothing checks the return value of moveTabTo so I removed the return value.
Attachment #548092 - Flags: review?(neil)

Comment 4

6 years ago
Comment on attachment 548092 [details] [diff] [review]
Patch v1.0 Return early if source index == destination index

>             this._browsers = null; // invalidate cache
>             this.mLastRelatedIndex = 0;
Nit: don't need to do this if we're not actually going to move the tab.
Attachment #548092 - Flags: review?(neil) → review+
(Assignee)

Comment 5

6 years ago
I found the Firefox bug that fixed the same problem:
Bug 541393 - gBrowser.moveTabTo(gBrowser.selectedTab, 0) with only one tab open moves the tab after the new tab button
See Also: → bug 541393
(Assignee)

Comment 6

6 years ago
Created attachment 548188 [details] [diff] [review]
Patch v1.1 as checked in. r=Neil

Pushed
http://hg.mozilla.org/comm-central/rev/bb52e3b67d0a
Assignee: nobody → philip.chee
Status: NEW → ASSIGNED
Attachment #548188 - Flags: review+
(Assignee)

Comment 7

6 years ago
Comment on attachment 548188 [details] [diff] [review]
Patch v1.1 as checked in. r=Neil

This bug was exposed when I made the tabbar scrollable. Needs backporting to SeaMonkey 2.4 and 2.3. Too late for 2.2.
Attachment #548188 - Flags: approval-comm-beta?
Attachment #548188 - Flags: approval-comm-aurora?

Updated

6 years ago
Attachment #548188 - Flags: approval-comm-beta?
Attachment #548188 - Flags: approval-comm-beta+
Attachment #548188 - Flags: approval-comm-aurora?
Attachment #548188 - Flags: approval-comm-aurora+
(Assignee)

Comment 8

6 years ago
Pushed
http://hg.mozilla.org/releases/comm-aurora/rev/40707d58c365
http://hg.mozilla.org/releases/comm-beta/rev/9b6351a1c2b9
Target Milestone: --- → seamonkey2.3
(Assignee)

Updated

6 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED

Updated

6 years ago
status-seamonkey2.3: --- → fixed
status-seamonkey2.4: --- → fixed
Target Milestone: seamonkey2.3 → seamonkey2.5
You need to log in before you can comment on or make changes to this bug.