phetsims / resistance-in-a-wire

"Resistance in a Wire" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/resistance-in-a-wire
GNU General Public License v3.0
1 stars 4 forks source link

"home" and "end" keyboard shortcuts don't work all the time. #163

Closed megan-phet closed 6 years ago

megan-phet commented 6 years ago

Test device:

Operating System:

Browser:

Problem description:

For phetsims/QA/issues/137 The "home" and "end" buttons are "fn"+["left arrow" or "right arrow"] on a Mac. If "fn"+"left arrow" and "fn"+ "right arrow" are pressed repeatedly one after another, it won't jump to maximum or minimum. This doesn't happen on Windows.

Steps to reproduce:

  1. keyboard navigate to one of the sliders
  2. press "fn"+"Left arrow"
  3. press "fn"+"Right arrow"
  4. repeat steps 2 and 3

Screenshots: Video

Troubleshooting information (do not edit):

Name: ‪Resistance in a Wire‬ URL: https://phet-dev.colorado.edu/html/resistance-in-a-wire/1.5.0-rc.7/phet/resistance-in-a-wire_all_phet.html Version: 1.5.0-rc.7 2018-06-28 23:34:38 UTC Features missing: touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.1 Safari/605.1.15 Language: en-US Window: 1310x736 Pixel Ratio: 2/1 WebGL: WebGL 1.0 (2.1 INTEL-10.34.27) GLSL: WebGL GLSL ES 1.0 (1.20) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 15 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 16) Max viewport: 8192x8192 OES_texture_float: true Dependencies JSON: {"assert":{"sha":"928741cf","branch":"HEAD"},"axon":{"sha":"cc053b4d","branch":"HEAD"},"brand":{"sha":"89d28f63","branch":"HEAD"},"chipper":{"sha":"fe3cb370","branch":"HEAD"},"dot":{"sha":"0dd6ee8e","branch":"HEAD"},"joist":{"sha":"f047fb1b","branch":"HEAD"},"kite":{"sha":"b6071478","branch":"HEAD"},"phet-core":{"sha":"f35ff65e","branch":"HEAD"},"phet-io":{"sha":"d54be499","branch":"HEAD"},"phet-io-website":{"sha":"28284828","branch":"HEAD"},"phet-io-wrapper-classroom-activity":{"sha":"c84e3046","branch":"HEAD"},"phet-io-wrapper-lab-book":{"sha":"ebf7c7dc","branch":"HEAD"},"phet-io-wrappers":{"sha":"ce57c3e2","branch":"HEAD"},"phetcommon":{"sha":"a5a7478c","branch":"HEAD"},"query-string-machine":{"sha":"485e174e","branch":"HEAD"},"resistance-in-a-wire":{"sha":"0520d7c1","branch":"HEAD"},"scenery":{"sha":"33290b5e","branch":"HEAD"},"scenery-phet":{"sha":"42b0cff2","branch":"HEAD"},"sherpa":{"sha":"9c6ec322","branch":"HEAD"},"sun":{"sha":"6a7c923a","branch":"HEAD"},"tandem":{"sha":"7f499d9e","branch":"HEAD"}}
zepumph commented 6 years ago

@jessegreenberg do you have access to a mac to confirm this bug? Can you provide insight?

jessegreenberg commented 6 years ago

I do, Ill take a look.

jessegreenberg commented 6 years ago

@megan-phet in the posted video (which is really helpful, thanks!) when it stops working, do you have to release the "fn" key and then press again to get features to work again?

jessegreenberg commented 6 years ago

Also, is VoiceOver turned on in these tests? I assume no but just want to make sure.

megan-phet commented 6 years ago

No I did not let go of the "fn" key, and VoiceOver was not on.

jessegreenberg commented 6 years ago

I was able to reproduce on Mac OS 10.13.5.

jessegreenberg commented 6 years ago

But it only happened when alternating between the arrow keys fast enough so that both were pressed at once for a split second.

jessegreenberg commented 6 years ago

For instance, another way to reproduce (and I think this is what is happening when pressing them quickly):

jessegreenberg commented 6 years ago

This may be an Apple behavior, browser is just clearly not sending key codes corresponding to "home" and "end" in this case. Ill try to reproduce in a JSFiddle, and also see if google knows about this.

jessegreenberg commented 6 years ago

This is also an issue for page up/page down.

jessegreenberg commented 6 years ago

Verified https://github.com/phetsims/resistance-in-a-wire/issues/163#issuecomment-403985560, I was able to reproduce the problem in this JSFidle on a Mac: http://jsfiddle.net/sp0569jw/6/.

I personally don't think this should block publication of RIAW. And since this is how Apple behaves with all web sliders, I am not sure if spending any time on a workaround is even worthwhile.

@emily-phet what do you think?

jessegreenberg commented 6 years ago

Hmm, just looking into it a little I am not sure if a workaround is possible. "Fn" key produces no DOM event when pressed, and it is not a modifier key. This behavior is still there when checking event.key, and I can't think of other options.

terracoda commented 6 years ago

@jessegreenberg, I personally do not think this should block publication. I use a Mac and have never noticed a problem with the Home and End Keys or the Page Up and Down keys.

I can't reproduce the problem on my Macbook Pro 10.13.5 when pressing quickly. I am not saying it is not a reproducible problem, but I can't reproduce it.

jessegreenberg commented 6 years ago

Excellent, thanks @terracoda!

zepumph commented 6 years ago

@jessegreenberg how should we proceed with this issue? Should we unassign? Mark low/deferred Priority? Move to a11y-research? Just close the issue and tag as a "wont-fix"?

jessegreenberg commented 6 years ago

Lets discuss open RIAW issues at todays a11y dev meeting.

jessegreenberg commented 6 years ago

Discussed 7/17/18 meeting:

It is OK to let this one go. We should add this bug to the list of "Platform A11y bugs".

jessegreenberg commented 6 years ago

Here is a link to the doc: https://docs.google.com/document/d/1518zv6F0odExFsodShZxwTmWNQk3civuNwtQUR-rEBs/edit

jessegreenberg commented 6 years ago

I added a note in the document, closing