phetsims / faradays-law

"Faraday's Law" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/faradays-law
GNU General Public License v3.0
1 stars 7 forks source link

Magnet can go through the "borders" in all parts of sim #205

Closed brooklynlash closed 3 years ago

brooklynlash commented 3 years ago

Test device Lenovo ThinkPad

Operating System Windows 10

Browser Chrome, Firefox

Problem description This is for https://github.com/phetsims/QA/issues/581 When dragging the magnet around the borders of the sim, the magnet can go "through" the borders and become hidden and missing. The best way to do this is to hit downwards first and then to the right, but you can get through the borders through any part of the frame.

Visuals This was on Firefox but I noticed on Chrome a bit as well. faradayiframefirefox

I also noticed this on the sim itself, as well as the html download on Chrome, and on my Macbook Pro 10.13.6 as well.

On sim: faradayborder

On Legends of Learning: faradayLoL

Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Faraday's Law‬ URL: https://phet-dev.colorado.edu/html/faradays-law/1.4.0-rc.1/phet/faradays-law_all_phet.html Version: 1.4.0-rc.1 2020-12-02 22:52:22 UTC Features missing: applicationcache, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36 Language: en-US Window: 1707x818 Pixel Ratio: 2.25/1 WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium) GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 30 uniform: 4095 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 32767x32767 OES_texture_float: true Dependencies JSON: {}

brooklynlash commented 3 years ago

This does not occur on the published sim or iframe.

jbphet commented 3 years ago

Nice catch @brooklynlash!

Here is an easier way to duplicate the problem, and the animated GIF below illustrates the sequence:

In my screen capture I hit a debugger statement, but in 1.4.0-rc.1 you can get the magnet through the boundary pretty easily. A similar process works in any corner.

fl-magnet-escape

Here is what's going on: I rewrote most of the code related to having the magnet bump into things, and I missed the case where it is trying to move a little in one direction and a lot in the other at the very corners of the bounds. I'll fix it.

jbphet commented 3 years ago

@KatieWoe and/or @brooklynlash - please test this on master and assign back to me with your results.

brooklynlash commented 3 years ago

Looks as if it is fixed on master! -- tested on Win 10 Chrome and Firefox

jbphet commented 3 years ago

Thanks @brooklynlash. Unassigning until the next RC, where I'll have it tested.

brooklynlash commented 3 years ago

Sorry, reassigning again. On master now, you can completely slide through the magnet coils, I thought that was related so I am commenting about that here. Basically for any movement the coils do not act like a barrier, except for the 1,2,3 buttons through keyboard nav. faradaycoil

KatieWoe commented 3 years ago

Good catch @brooklynlash I looked a bit myself, and wanted to note that this is different from https://github.com/phetsims/faradays-law/issues/195 as the speed of dragging or performance of the device does not matter, the boundary isn't even there in this case.

brooklynlash commented 3 years ago

Another thing to note: the sound effects still work as usual through the coils but the boundary is just not there

jbphet commented 3 years ago

Oops. I clearly blew my regression testing. Fixed now, please have another go at it on master.

brooklynlash commented 3 years ago

Works now on master

KatieWoe commented 3 years ago

Noting here that I saw this on iPad Safari.

jbphet commented 3 years ago

The fixes for this issue have now been cherry-picked to the 1.4 release branch.

phet-steele commented 3 years ago

This looks good for me in 1.4.0-rc.2!