-
Notifications
You must be signed in to change notification settings - Fork 4
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 and blur events don't fire while fuzzing if the document does not have focus #134
Comments
@zepumph and I met to discuss. We tried to get a headless Chrome up and running to verify that We couldn't think of fix yet so we are going to add a check to only fuzz keyboard events if We want to try again to get |
I am seeing errors from fuzzBoard on CT still, I am curious how that is possible after the above commit. Perhaps my understanding of this issue is not correct.
|
Perhaps we can just explicitly put focus on the frame where the sim is being fuzzed to ensure that it will produce focus and blur events. It seems like it is sometimes doing that but not always. Like https://github.com/phetsims/phet-io-wrappers/blob/17e332da4b14b43f1a54f7f00e87ffa278e05ec1/input-record-and-playback/inputRecordAndPlayback.js#L229 |
This came up again in phetsims/joist#897. Since puppeteer doesn't support focus and blur events, unit tests for focus state were failing. Wrapping the tests in a |
This is happening again on CT for a new set of focus tests:
I will opt out of these for now when the document is not active. |
More tests have been failing. I added the opt out to many more tests. I looked for a more elegant way to opt out in a Now when I run scenery unit tests while the browser is in the background everything is passing. If this is ever resolved we should remove these opt-outs. |
If the document does not have focus,
focus
andblur
events don't fire. Code dependent on these listeners will never fire while the sim is in the background. For example, that means thatFocusManager.pdomFocusProperty
will always benull
because it is set in response tofocus
andblur
events.This is causing phetsims/geometric-optics#384. I also ran into it this morning while working on KeyboardDragListener, seeing that none of
interrupt
fromblur
was never called while fuzzing which is a problem.The text was updated successfully, but these errors were encountered: