phetsims / scenery

Scenery is an HTML5 scene graph.
http://scenerystack.org/
MIT License
55 stars 12 forks source link

[Safari] pause when exiting Full Screen #993

Open pixelzoom opened 5 years ago

pixelzoom commented 5 years ago

I'm creating this issue in scenery, because FullScreen contains "Utilities for full-screen support".

In https://github.com/phetsims/gas-properties/issues/163, QA identified a problem when exiting Full Screen mode. When a sim like Gas Properties or States of Matter has "lots of moving parts", there is a pause that can be anywhere from seconds to minutes. During this time, the browser appears to be frozen, and both the browser and sim are unusable.

According to the report, this seems to be specific to Safari. @KatieWoe said:

So far this bug has only been seen on Safari (I have tested on macOS Chrome, and Windows 10 Edge, Firefox, and Chrome).

Assigning to @ariel-phet to prioritize and assign.

pixelzoom commented 5 years ago

Here's the full report from https://github.com/phetsims/gas-properties/issues/163:

Test device MacBook Air Operating System macOS 10.14.6 Browser Safari Problem description For https://github.com/phetsims/QA/issues/399. On macOS 10.14.6 on Safari I have noticed some problems when a large amount of particles are present and full screen mode is exited. The behavior of this problem differs from time to time and sometimes it has little or no impact on the sim performance. When the bug occurs the time to properly resize can take as little as half a second and as long as two minutes. During this time when the sim has not resized the whole sim area is unusable and Safari seems to be frozen (other Safari tabs can not be selected, the page can not be reloaded, the search bar becomes unusable, and the Safari app can not be closed or minimized). This becomes particularly problematic when the extreme times to resize occur as the sim and whole browser become unusable until the issue is resolved. As mentioned before the bug is not consistent and given the same conditions the time to resize can vary greatly from one occurrence to the next. Using the iFrame or XHTML versions of the sim seems to increase the time to resize but the base sim also experiences this problem. What I have found is that as a general rule the more complex the sim becomes the longer it takes to resize, which is why I have not noticed the issue on the "Diffusion" screen yet. I have done some testing on other sims with lots of moving parts such as "States of Matter" and the same issue occurs, however the sim resizes very quickly (about half a second), most likely due to the smaller amount of particles present in SoM. This makes me think that this might be a scenery issue that is present in many sims but for now I'll keep it here and leave that decision to the devs. So far this bug has only been seen on Safari (I have tested on macOS Chrome, and Windows 10 Edge, Firefox, and Chrome).

Steps to reproduce

  1. Go to "Ideal", "Explore", or "Energy" screens (it might happen on the "Diffusion" screen but the time to resize is so small that I have yet to see this bug occur on this screen)
  2. Enter full screen mode
  3. Add the maximum amount of particles (1000 of each, you might have to decrease the temp to ensure the lid does not pop off)
  4. Add all other options such as Width, Stopwatch, Collision Counter, Speed and KE (where applicable)
  5. Exit full screen using either the PhET menu or "esc" button
  6. The sim should take a bit to resize (again the time to resize varies from time to time)
  7. While the sim has not resized (refer to visual for example of resizing issue) click anywhere on the sim or Safari window, nothing should be able to be clicked or manipulated.

Visuals Screen Shot 2019-08-09 at 11 13 26 AM

ariel-phet commented 4 years ago

I am marking this issue as deferred for the moment.

Priority can be raised if we get a user reported bug. My reasoning is that:

  1. It is not clear how much our user's know about the full screen option (I rarely see fullscreen sims on media tweets on twitter, and those all seem to be from the app).

  2. The fullscreen option is buried in the menu

  3. If you have actually bothered to go to the menu to make the sim full screen you are likely to keep it fullscreen until the simulation use is finished.

So basically, my guess is this would potentially be tricky to fix, and only seems to affect one platform in a rare usecase.