The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniWeb Bug Reports (http://forums.omnigroup.com/forumdisplay.php?f=27)
-   -   Jarring pseudo-focus shift after opening tab in background (http://forums.omnigroup.com/showthread.php?t=1089)

Bob Williams 2006-07-18 12:14 PM

Jarring pseudo-focus shift after opening tab in background
 
While reading certain sites, especially news sites, I will frequently just click links with the middle button (the scroll wheel in my case) on my mouse to open them in background tabs. With the SP releases, however, I periodically get a strange behavior where everything goes as planned until the background tab finishes loading, at which point its content is shown in the window. When this happens, both the original tab and the new tab are shown highlighted in the tab drawer, and OW acts confused - it's as though it doesn't know what tab has focus. Clicking the original tab again selects it fully and unselects the new tab.

I've run into this on both my desktop and my laptop. Has anyone else seen this?

Forrest 2006-07-18 02:24 PM

I typically command+click links to do this, and haven't had any issues like that.

David Shepherdson 2006-07-19 12:51 AM

I have seen exactly the same behaviour with the last couple of Sneaky Peeks, and I think it has to do with sites using JavaScript to set the keyboard focus for form fields after they've loaded (though I must say I haven't looked into it so I have no evidence for that claim :)).

I particularly notice this with the UK National Rail site at [URL="http://www.nationalrail.co.uk/"]http://www.nationalrail.co.uk/[/URL]. If I do a timetable search, then command-click one of the result links so it opens in a background tab, that tab grabs the focus when it finishes loading.

As the original poster described, the tab drawer exhibits some unusual behaviour in this situation, with the originally-selected tab retaining the outline of its 'highlight colour' around the tab thumbnail, while the newly-opened tab has its thumbnail indicated with the highlight colour as though it has been clicked. (Er, that description sounds a bit confusing, but short of a screenshot it's a bit tricky to describe...)

David Shepherdson 2006-07-19 12:57 AM

1 Attachment(s)
All right, so after posting that I had to investigate further. :)

It seems my theory about JavaScript and focus was almost correct. The National Rail pages have code like this in them:

[CODE]<script type="text/javascript">
window.onload=function(){this.focus(); }
</script>[/CODE]

...which I think is the trigger for this unusual behaviour.

Here also is a screenshot showing the tab highlighting when this occurs:

[ATTACH]69[/ATTACH]

David

Bob Williams 2006-07-19 01:21 AM

[QUOTE=David Shepherdson][CODE]<script type="text/javascript">
window.onload=function(){this.focus(); }
</script>[/CODE][/QUOTE]

"Our site is so great that we know you [i]absolutely[/i] want to give it your full, undivided attention when it finishes loading, even if you opted to load it in the background while working on other things!"

Stupid web developers. (As a web developer myself, I can rightly call certain of us stupid if I want.)

What I'd do to these folks if I got my hands on them.... USABILITY, people, USABILITY!

Forrest 2006-07-19 08:38 AM

[QUOTE=Bob Williams]"Our site is so great that we know you [i]absolutely[/i] want to give it your full, undivided attention when it finishes loading, even if you opted to load it in the background while working on other things!"

Stupid web developers. (As a web developer myself, I can rightly call certain of us stupid if I want.)

What I'd do to these folks if I got my hands on them.... USABILITY, people, USABILITY![/QUOTE]

I concur .

troyb 2006-07-19 05:57 PM

Those of you having this multi-select problem. In the security preferences do you have "Allow JavaScript to reorder windows" checked?

David Shepherdson 2006-07-19 09:52 PM

[QUOTE=troyb]Those of you having this multi-select problem. In the security preferences do you have "Allow JavaScript to reorder windows" checked?[/QUOTE]

I've never noticed that preference... so the answer is yes.

I've just tried turning it off then seeing what happens with my National Rail test case, and the problem no longer occurs. Good thinking, troyb!

So, there's the solution to our irritating user experience -- thanks Omni for building it in before we realised we needed it! :)

The weird tab selection is still a bug, obviously, but a much tamer one than we originally thought.

Forrest 2006-07-19 10:10 PM

[QUOTE=troyb]Those of you having this multi-select problem. In the security preferences do you have "Allow JavaScript to reorder windows" checked?[/QUOTE]

WOW, this pref actually takes care of an unrelated issue I was having. sweeet! only thing is, it doesn't seem to work as a site pref.

Bob Williams 2006-07-19 10:58 PM

[QUOTE=troyb]Those of you having this multi-select problem. In the security preferences do you have "Allow JavaScript to reorder windows" checked?[/QUOTE]

Yep, sure do; I'll turn it off and see if it kills the problem. I assume it will. As another poster said, there's obviously still a bug, but in this case, I'm content with the kill-the-feature approach to bug avoidance :-). I'm sure you'll still want to fix the issue, though, for those poor folks out there who visit sites that require that ability in scripts.

You know, I thought I had that pref turned off, but I must've turned it back on at some point for some reason and forgot about it....

Anyway, thanks!


All times are GMT -8. The time now is 01:54 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.