Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Focus detection not fully functional #29

Closed
dbb613 opened this issue Jul 8, 2014 · 8 comments
Closed

Focus detection not fully functional #29

dbb613 opened this issue Jul 8, 2014 · 8 comments
Labels
Milestone

Comments

@dbb613
Copy link
Contributor

dbb613 commented Jul 8, 2014

The OpenVV focus detection seems to be only partially functional. It properly detects when you have switched to a different tab or have minified the browser, but does not properly detect when you place another window such that it overlaps the browser window containing the asset.

This used to work properly in an older version of OpenVV, so I'd consider it a regression bug.

This behavior can be observed with both IFRAMEd and non-IFRAMEd cases. See these example links:

Note that these are both based off of my fork which has the latest code as of commit id 812622c.

My code is here for reference: https://github.com/dbb613/openvv/tree/test-pages_and_build-improvement

Configurations Tested:

  • Windows 8, Chrome v. 35.0.1916.153 m, Flash 14.0.0.125 (Chrome Built-in)
  • Mac OS X 10.9, Chrome v. 35.0.1916.153 m, Flash 14.0.0.125 (Chrome Built-in)
@alonashkenazi
Copy link
Contributor

As far as I remember the focus never worked when place another window (like
excel) such that it overlaps the browser window containing the asset.
I'll check the older focus code, but if you can create a demo page with the
old code that show that the focus is working it will help.

On Tue, Jul 8, 2014 at 6:45 PM, dbb613 [email protected] wrote:

The OpenVV focus detection seems to be only partially functional. It
properly detects when you have switched to a different tab or have minified
the browser, but does not properly detect when you place another window
such that it overlaps the browser window containing the asset.

This used to work properly in an older version of OpenVV, so I'd consider
it a regression bug.

This behavior can be observed with both IFRAMEd and non-IFRAMEd cases. See
these example links:

http://dl.dropboxusercontent.com/u/4933656/openvv/c3c8e769b5e40c1f8b951f2458801cd056af31fd/test-pages/index.html

http://dl.dropboxusercontent.com/u/4933656/openvv/c3c8e769b5e40c1f8b951f2458801cd056af31fd/test-pages/iframe-parent.html

Note that these are both based off of my fork which has the latest code as
of commit id 812622c
812622c
.


Reply to this email directly or view it on GitHub
#29.

@dbb613
Copy link
Contributor Author

dbb613 commented Jul 9, 2014

I am quite certain that focus detection used to work more completely -- specifically when another window overlaps the browser window.

I can send you a demo link, but in short, the focus detection code was:

https://github.com/openvv/openvv/blob/693959bb25a076271d1f078ea20fdd523c8ee70e/src/org/openvv/OVVCheck.as#L137

@dbb613
Copy link
Contributor Author

dbb613 commented Jul 9, 2014

Is there a reason why this logic was removed? It seems essential to proper detection of focus.

@alonashkenazi
Copy link
Contributor

The old focus detection didn't detect correctly on FF and IE browsers. I'll
look into it today and update.

On Wed, Jul 9, 2014 at 10:16 AM, dbb613 [email protected] wrote:

Is there a reason why this logic was removed? It seems essential to proper
detection of focus.


Reply to this email directly or view it on GitHub
#29 (comment).

@dbb613
Copy link
Contributor Author

dbb613 commented Jul 9, 2014

From my tests, it looks like the old focus detect does work in recent FireFox (v 30 works). I think using hasFocus is tricky because it doesn't work as expected when inside an IFRAME, but in all other cases, we should be using that to take into account a broader range of "out of focus" situations not covered by using the various hidden properties or visibilityState properties.

@alonashkenazi
Copy link
Contributor

Can you share the test page?

On Wed, Jul 9, 2014 at 12:52 PM, dbb613 [email protected] wrote:

From my tests, it looks like the old focus detect does work in recent
FireFox (v 30 works). I think using hasFocus is tricky because it doesn't
work as expected when inside an IFRAME, but in all other cases, we should
be using that to take into account a broader range of "out of focus"
situations not covered by using the various hidden properties or
visibilityState properties.


Reply to this email directly or view it on GitHub
#29 (comment).

@bdementatbrightroll
Copy link
Contributor

Hey guys, I just added a test page/harness into the test_page branch that may be of help here.

@alonashkenazi alonashkenazi added this to the V 1.0 milestone Jul 10, 2014
@alonashkenazi alonashkenazi self-assigned this Jul 10, 2014
@alonashkenazi
Copy link
Contributor

The summary of the expected behavior is here:https://docs.google.com/spreadsheets/d/1SriqfUS17Riij6C8xsb71pxNlD8L1wGXIUhoICSQ1Vc/edit#gid=1680772678
I opened a new bug for the Chrome/Mac detection issue (#37 - #37)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants