-
Notifications
You must be signed in to change notification settings - Fork 8
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
Sim won't behave properly after keyboard nav in full screen IE #317
Comments
@KatieWoe is this reproducible in Windows 10? |
@jessegreenberg yes |
Good deal, that will make it easier to investigate. Thanks. |
Able to reproduce, shortly after the bug happened, IE11 crashed with "A problem occurred..." I verified that this is specific to IE11, and doesn't happen in Chrome or Edge. |
When I run a mangle=false version of the sim, IE11 tells me Pointing to this line blur: function() {
this._primarySibling.blur();
}, |
Presumably this is in AccessiblePeer. |
Noting here that this is present on Win 8.1 IE as well |
The HTML element that we are trying to blur is defined in IE11. UPDATE: |
I am pretty sure that what is happening is that blur() in IE11 throws an error if the element is not in the document. EDIT: This doesn't explain why this isn't happening for other phet menu items. if ( document.getElementById( this._primarySibling.id ) ) {
this._primarySibling.blur();
} and the issue persists. |
Here are some modifications in a non-mangled built version: blur: function() {
window.peer = this, window.element = this._primarySibling, document.activeElement === this._primarySibling && this._primarySibling.blur();
},
So it seems like things are OK in the console, but not OK at runtime. |
This bug report looks really similar to what we are seeing |
Maybe the blur is a read herring, and the error is happening elsewhere. |
This isn't happening in the deployed version of the sim, that might help isolate the problem. |
Just found that this issue is happening to an even larger extent in phetsims/qa#203 (Coulomb's Law). In addition to this issue, if keyboard nav is used on the home screen on full screen it crashes and looses many images. |
Thanks @KatieWoe, that is the same issue. We are trying to blur document.activeElement in fullScreen mode and IE11 reports "Incorrect Function". |
So it seems like blur works as long as the element is not document.activeElement for IE11 in fullscreen mode...which means that blur doesn't work for IE11 in fullscreen mode. But this implementation of AccessiblePeer.blur makes the problem go away in both john-travoltage and coulombs-law: blur: function() {
assert && assert( this._primarySibling, 'must have a primary sibling to blur' );
var tempElement = document.createElement( 'button' );
tempElement.focus();
// this._primarySibling.blur();
}, |
A bug reported to jquery about this in https://bugs.jquery.com/ticket/15044 was closed with comment
But the sim becomes unusable in this case so Ill continue with #317 (comment) as a workaround. |
I tried addign this: if ( platform.ie11 && Fullscreen.isFullScreen() ) {
IE_BLUR_ELEMENT.focus();
} and the sim works but document.activeElement still equals the primary sibling. Maybe this will work if IE_BLUR_ELEMENT is attached to the document? |
It did not work. #317 (comment) is a more graceful solution, and is definitely one way to go. Apparently IE11 has a special function |
It did not. Comments in other threads are suggesting a timeout might work as a workaround. |
A timeout (though ugly) seems to work great. All recomendations in this stackoverlfow suggest a timeout for focus issues in IE11 |
@zepumph helped me commit this change, we verified that this is working now in IE11 and in other platforms too. The release of JT will need a scenery branch with this commit. |
The above commit should fix all occurrences of this (JT, CL, GFL:B, and more). @KatieWoe can you please check that this is fixed in built versions of the sim in IE11 using phettest (since requirejs won't work in IE11)? |
@jessegreenberg just test the three sims mentioned on Win 10 IE 11 and it all looks good. |
…hn-travoltage#317 (cherry picked from commit 04ca1d7)
This isn't working for me. I first tried propagating it to the RC branch, but the problem wasn't gone, so I tried building off master, and I'm still seeing the lockup there as well. I noticed the code is using |
I changed it to use |
Worked with @jbphet to verify a fix. Removing my assignment for now. |
@jessegreenberg Looks ok on JT 1.5.0-rc.3 on Win 10 IE 11. Do you want this left open for a future maintenance release, or should it be closed? |
Device
hp laptop
OS
Win 7
Browser
Internet explorer.
Problem Description
For phetsims/qa#200 possibly related to #314
When using keyboard nav in the full screen mode, if you switch to using a mouse the sim will become uninteractable. Any animations in progress (electron discharge) will continue, but mouse input will do nothing. Leaving full screen does not solve this. It seems the only way to leave is by pressing escape, as using keyboard nav does not seem to work. After escaping, if mouse was used in full screen the sim is still uninteractable with mouse. If it was not, and keyboard nav was used in an attempt to leave, the phet menu stays up, even when the sim is being manipulated.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: