Closed Bug 1232800 Opened 9 years ago Closed 9 years ago

tabbrowser's moveTabTo should re-set hovered state on the currently-hovered tab, not the previous one (fixes tab separators when hovered tabs get moved using the keyboard)

Categories

(Firefox :: Tabbed Browser, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 46
Tracking Status
firefox46 --- fixed

People

(Reporter: arni2033, Assigned: Gijs)

References

Details

Attachments

(2 files)

>>>   My Info:   Win7_64, Nightly 45, 32bit, ID 20151215030221
STR:
1. Open new firefox window, open many tabs to trigger overflow in tabs toolbar
2. Select the last tab in the list, hover mouse over that tab. Don't move mouse anymore.
3. Press Ctrl+Shift+PageUp
4. Press Ctrl+Shift+PageDown

Result:       
 There's no separator displayed before penultimate tab

Expectations: 
 There should be a separator
This is because moveTabTo in tabbrowser.xml re-sets the hovered tab's attributes, but it assumes that the hovered tab is still hovered, which of course it might not be after the move.
Component: Theme → Tabbed Browser
Summary: There's no borders (separators) between tabs after specific steps → tabbrowser's moveTabTo should re-set hovered state on the currently-hovered tab, not the previous one (fixes tab separators when hovered tabs get moved using the keyboard)
This should do the trick (seems to wfm)?
Attachment #8698969 - Flags: review?(dao)
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Comment on attachment 8698969 [details] [diff] [review]
simulate mouseenter on the currently-hovered tab, not the previously-hovered one,

Is _hoveredTab updated after this call or does it just remain stale?
Comment on attachment 8698969 [details] [diff] [review]
simulate mouseenter on the currently-hovered tab, not the previously-hovered one,

(In reply to Dão Gottwald [:dao] from comment #3)
> Comment on attachment 8698969 [details] [diff] [review]
> simulate mouseenter on the currently-hovered tab, not the previously-hovered
> one,
> 
> Is _hoveredTab updated after this call or does it just remain stale?

Good point. I'm not sure offhand but I suspect the latter. Will have another look.
Attachment #8698969 - Attachment is obsolete: true
Attachment #8698969 - Flags: review?(dao)
Comment on attachment 8698969 [details] [diff] [review]
simulate mouseenter on the currently-hovered tab, not the previously-hovered one,

(In reply to Dão Gottwald [:dao] from comment #3)
> Comment on attachment 8698969 [details] [diff] [review]
> simulate mouseenter on the currently-hovered tab, not the previously-hovered
> one,
> 
> Is _hoveredTab updated after this call or does it just remain stale?

Eh, actually:

https://dxr.mozilla.org/mozilla-central/rev/0babaa3edcf908c393b68a3dc2d1c2a2450c31ed/browser/base/content/tabbrowser.xml#6084

this gets updated, so that should work.
Attachment #8698969 - Attachment is obsolete: false
Attachment #8698969 - Flags: review?(dao)
Attachment #8698969 - Flags: review?(dao) → review+
https://hg.mozilla.org/mozilla-central/rev/4c0dac5db910
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
Has STR: --- → yes
[bugday-20160323]

Status: RESOLVED,FIXED -> VERIFIED

Comments:
Test successful

Component: 
Name			Firefox
Version			46.0b9
Build ID		20160322075646
Update Channel	        beta
User Agent		Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
OS			Windows 7 SP1 x86_64

Expected Results: 
There is a separator between tabs

Actual Results: 
As expected
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: