Closed Bug 790662 Opened 12 years ago Closed 12 years ago

tab bar grabs focus after switching active tab

Categories

(SeaMonkey :: Themes, defect)

defect
Not set
normal

Tracking

(seamonkey2.12 wontfix, seamonkey2.13 fixed, seamonkey2.14 verified, seamonkey2.15 verified)

RESOLVED FIXED
seamonkey2.15
Tracking Status
seamonkey2.12 --- wontfix
seamonkey2.13 --- fixed
seamonkey2.14 --- verified
seamonkey2.15 --- verified

People

(Reporter: markus, Assigned: ewong)

Details

(Keywords: access, ux-consistency, verifyme)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 5.2; WOW64; rv:15.0) Gecko/20120909 Firefox/15.0.1 SeaMonkey/2.12.1
Build ID: 20120909051100

Steps to reproduce:

Since I updated to 2.11, the tab bar now grabs focus when clicking to switch to another tab.
(2.12 en-us on WinXP64sp2, no tab-behaviour modifying addons installed)

Turning off all addons etc did not change anything.
With experiments guided by folks on IRC, I could narrow it down to only ocurring in the "modern" theme. Switching to SeaMonkey Classic theme restores the "expected" behaviour.


Actual results:

This means that cursor/page keys meant to move the content in the newly active tab, now instead move around in the tab bar, requiring the user to click into the content area before moving. This is quite an inconvenience, and breaks usage experience from pre-2.11 versions.



Expected results:

IMHO, the tab bar should only grab focus when e.g. clicking on the already active tab. Otherwise, cursor/page controls should default to the content area. Especially, the behaviour should be consistent through all themes.
Further experiments done:
grab some other themes off addons.mozilla.org (Kilome and EarlyBlue): bug does NOT appear

Create fresh profile - modern theme: bug appears
Create fresh profile - any other theme: bug does NOT appear.
Keywords: modern
Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/18.0 Firefox/18.0 SeaMonkey/2.15a1 ID:20120912003008 c-c:cebc1b16ac6b m-c:6e78c3efd115

I can reproduce the problem in this Linux trunk build.

In (for instance) EarlyBlue, SeaMonkey remembers the cursor location, and when I switch back and forth between tabs where a textarea has focus, I keep seeing the blinking insert bar where it used to be.

In Modern, the cursor location is forgotten, and after changing tabs, hitting Tab gives focus to the first focusable element in content.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows Server 2003 → All
Hardware: x86_64 → All
Version: SeaMonkey 2.12 Branch → Trunk
P.S. IMHO the question of whether the cursor location should be persisted or reset could be argued both ways (maybe the opinion of a blind user should be asked) but in any case all themes should exhibit the same behaviour.
Adding some CCs of people who I think are well-acquainted with Modern, or with SeaMonkey themes in general.
Maybe ewong can port the relevant part of bug 491636 for us, which bug 743877 was relying on to work properly.
In Pinball theme - the same bug.
(In reply to Vladimir from comment #6)
> In Pinball theme - the same bug.

As far as I can tell, Pinball hasn't been updated for some time. Making the theme work in SeaMonkey 2.1 or later is simply a case of porting bug 491636, i.e. removing the selected tab focus rule. However if you want the theme to continue to work in SeaMonkey 2.0 as well then you would have to port bug 743877 instead. This is because you have to leave the focus rule in the theme to work with 2.0 but you have to add the :not(ignorefocus="true") attribute selector to work with 2.12 or later.
Assignee: nobody → ewong
Status: NEW → ASSIGNED
Attachment #661083 - Flags: review?(neil) → review+
Comment on attachment 661083 [details] [diff] [review]
tab bar grabs focus after switching active tab (v1)

[Approval Request Comment]
Regression caused by (bug #): 
User impact if declined: focus not correct
Testing completed (on m-c, etc.): 
Risk to taking this patch (and alternatives if risky): None
String changes made by this patch: None
Attachment #661083 - Flags: approval-comm-beta?
Attachment #661083 - Flags: approval-comm-aurora?
Attachment #661083 - Flags: approval-comm-beta?
Attachment #661083 - Flags: approval-comm-beta+
Attachment #661083 - Flags: approval-comm-aurora?
Attachment #661083 - Flags: approval-comm-aurora+
(In reply to Edmund Wong (:ewong) from comment #10)
> Pushed to comm-central:
> http://hg.mozilla.org/comm-central/rev/4fac45745a73
> 
> Pushed to comm-beta:
> http://hg.mozilla.org/releases/comm-beta/rev/fec99851f292

er, pushed to comm-aurora?

Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/18.0 Firefox/18.0 SeaMonkey/2.15a1 ID:20120914005140 c-c:4fac45745a73 m-c:e5af3d785252

SeaMonkey now remembers cursor location after switching tabs => VERIFIED for trunk.

Ewong: I notice you didn't set this bug FIXED, is it intentional?
P.S. The above check was done with the Modern theme, of course.
P.P.S. AFAICT, the fix has not been pushed to comm-aurora, whose URL is http://hg.mozilla.org/releases/comm-aurora/
(In reply to Philip Chee from comment #15)
> CC Stefanh:
> > Don't we have to fix this line too?
> > http://hg.mozilla.org/comm-central/annotate/4fac45745a73/suite/themes/classic/mac/navigator/tabbrowser.css#l109

Looks like it, yes.
And yet comment #0 says that the default theme is OK.

EarlyBlue has

tab[selected="true"]:not([ignorefocus="true"]) { -moz-user-focus: normal }

and there too, it works. Maybe so that clicking the _current_ tab would give it focus?
...ops, that's xul.css, a locked file somewhere in omni.ja :")
(In reply to Tony Mechelynck from comment #17)
> EarlyBlue has
> 
> tab[selected="true"]:not([ignorefocus="true"]) { -moz-user-focus: normal }
> 
> and there too, it works.
As I said in comment #7, if you add the :not([ignorefocus="true"]) then the rule will work both in 2.12 and 2.0.x; we obviously don't need to worry about 2.0.x compatibility so we just removed the rule altogether.
User agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Firefox/17.0 SeaMonkey/2.14a2
20120914054440
http://hg.mozilla.org/releases/mozilla-aurora/rev/3e04584e30f7
http://hg.mozilla.org/releases/comm-aurora/rev/4787acf6b909

Focus behaves "as expected" in both default and Modern:
- When clicking a different (already looked at) tab, the cursor is where it used to be
- When clicking the current tab, the tab (on the tab bar) gets focus.
(In reply to Philip Chee from comment #14)
> Pushed to comm-aurora:
> http://hg.mozilla.org/releases/comm-aurora/rev/4787acf6b909
> 
> Don't we have to fix this line too?
> http://hg.mozilla.org/comm-central/annotate/4fac45745a73/suite/themes/
> classic/mac/navigator/tabbrowser.css#l109

I was having some problems checking out Aurora.  Was going to do it, but
thanks for helping me push to Aurora.
Comment on attachment 661448 [details] [diff] [review]
Followup patch for bug 790662 to fix mac's tabbrowser.css. (v1)

Probably material for a new bug, but if you have several tabs open and th content area focused in the active tab, a drag and drop operation of the active tab makes the content area lose focus.
Attachment #661448 - Flags: review?(stefanh) → review+
Keywords: modern
Comment on attachment 661448 [details] [diff] [review]
Followup patch for bug 790662 to fix mac's tabbrowser.css. (v1)

The mac default theme suffers from this on aurora/beta too.
Attachment #661448 - Flags: approval-comm-beta?
Attachment #661448 - Flags: approval-comm-aurora?
Attachment #661448 - Flags: approval-comm-beta?
Attachment #661448 - Flags: approval-comm-beta+
Attachment #661448 - Flags: approval-comm-aurora?
Attachment #661448 - Flags: approval-comm-aurora+
Since I'm on Linux, I cannot VERIFY the mac bits.
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.