Last Comment Bug 790662 - tab bar grabs focus after switching active tab
: tab bar grabs focus after switching active tab
Status: RESOLVED FIXED
: access, ux-consistency, verifyme
Product: SeaMonkey
Classification: Client Software
Component: Themes (show other bugs)
: Trunk
: All All
: -- normal (vote)
: seamonkey2.15
Assigned To: Edmund Wong (:ewong)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-12 09:14 PDT by Markus Strangl
Modified: 2012-09-18 15:45 PDT (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
wontfix
fixed
verified
verified


Attachments
tab bar grabs focus after switching active tab (v1) (685 bytes, patch)
2012-09-13 18:32 PDT, Edmund Wong (:ewong)
neil: review+
bugspam.Callek: approval‑comm‑aurora+
bugspam.Callek: approval‑comm‑beta+
Details | Diff | Review
Followup patch for bug 790662 to fix mac's tabbrowser.css. (v1) (845 bytes, patch)
2012-09-14 20:22 PDT, Edmund Wong (:ewong)
stefanh: review+
bugspam.Callek: approval‑comm‑aurora+
bugspam.Callek: approval‑comm‑beta+
Details | Diff | Review

Description Markus Strangl 2012-09-12 09:14:18 PDT
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.
Comment 1 Markus Strangl 2012-09-12 10:05:32 PDT
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.
Comment 2 Tony Mechelynck [:tonymec] 2012-09-12 11:20:21 PDT
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.
Comment 3 Tony Mechelynck [:tonymec] 2012-09-12 11:40:40 PDT
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.
Comment 4 Tony Mechelynck [:tonymec] 2012-09-12 12:51:39 PDT
Adding some CCs of people who I think are well-acquainted with Modern, or with SeaMonkey themes in general.
Comment 5 neil@parkwaycc.co.uk 2012-09-12 13:21:08 PDT
Maybe ewong can port the relevant part of bug 491636 for us, which bug 743877 was relying on to work properly.
Comment 6 Vladimir 2012-09-13 13:18:14 PDT
In Pinball theme - the same bug.
Comment 7 neil@parkwaycc.co.uk 2012-09-13 15:08:06 PDT
(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.
Comment 8 Edmund Wong (:ewong) 2012-09-13 18:32:44 PDT
Created attachment 661083 [details] [diff] [review]
tab bar grabs focus after switching active tab (v1)
Comment 9 Edmund Wong (:ewong) 2012-09-14 00:43:41 PDT
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
Comment 10 Edmund Wong (:ewong) 2012-09-14 01:59:26 PDT
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
Comment 11 Tony Mechelynck [:tonymec] 2012-09-14 03:18:11 PDT
(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?
Comment 12 Tony Mechelynck [:tonymec] 2012-09-14 03:22:53 PDT
P.S. The above check was done with the Modern theme, of course.
Comment 13 Tony Mechelynck [:tonymec] 2012-09-14 03:37:08 PDT
P.P.S. AFAICT, the fix has not been pushed to comm-aurora, whose URL is http://hg.mozilla.org/releases/comm-aurora/
Comment 15 Philip Chee 2012-09-14 06:32:06 PDT
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
Comment 16 Stefan [:stefanh] (away until May 28) 2012-09-14 07:30:33 PDT
(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.
Comment 17 Tony Mechelynck [:tonymec] 2012-09-14 08:11:31 PDT
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?
Comment 18 Tony Mechelynck [:tonymec] 2012-09-14 08:33:40 PDT
...ops, that's xul.css, a locked file somewhere in omni.ja :")
Comment 19 neil@parkwaycc.co.uk 2012-09-14 08:59:43 PDT
(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.
Comment 20 Tony Mechelynck [:tonymec] 2012-09-14 09:08:33 PDT
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.
Comment 21 Edmund Wong (:ewong) 2012-09-14 18:53:00 PDT
(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 22 Edmund Wong (:ewong) 2012-09-14 20:22:04 PDT
Created attachment 661448 [details] [diff] [review]
Followup patch for bug 790662 to fix mac's tabbrowser.css. (v1)
Comment 23 Stefan [:stefanh] (away until May 28) 2012-09-14 23:58:36 PDT
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.
Comment 24 Stefan [:stefanh] (away until May 28) 2012-09-16 10:01:55 PDT
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.
Comment 26 Tony Mechelynck [:tonymec] 2012-09-18 15:45:44 PDT
Since I'm on Linux, I cannot VERIFY the mac bits.

Note You need to log in before you can comment on or make changes to this bug.