Skip to content

Commit

Permalink
removed workaround code for fuzzBoard test issue, see #217
Browse files Browse the repository at this point in the history
  • Loading branch information
jbphet committed Jan 20, 2021
1 parent 558c30a commit ceacf8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 1 addition & 5 deletions js/faradays-law/view/MagnetAutoSlideKeyboardListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,7 @@ class MagnetAutoSlideKeyboardListener {
// check if the key is "modified"
let keyModified = false;
KEY_MODIFIER_LIST.forEach( modifierArg => {

// TODO: We need to check for whether getModifierState is defined, but so far it's only undefined during fuzzBoard testing, see https://github.com/phetsims/faradays-law/issues/217.
if ( event.domEvent.getModifierState ) {
keyModified = keyModified || event.domEvent.getModifierState( modifierArg );
}
keyModified = keyModified || event.domEvent.getModifierState( modifierArg );
} );

const keyCode = event.domEvent.keyCode;
Expand Down
4 changes: 1 addition & 3 deletions js/faradays-law/view/MagnetNodeWithField.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,7 @@ const createMagnetNode = magnet => {
* @returns {boolean}
*/
const isKeyModified = domEvent => {

// TODO: We need to check for whether getModifierState is defined, but so far it's only undefined during fuzzBoard testing, see https://github.com/phetsims/faradays-law/issues/217.
return domEvent.getModifierState && ( domEvent.getModifierState( 'Control' ) || domEvent.getModifierState( 'Alt' ) );
return domEvent.getModifierState( 'Control' ) || domEvent.getModifierState( 'Alt' );
};

faradaysLaw.register( 'MagnetNodeWithField', MagnetNodeWithField );
Expand Down

0 comments on commit ceacf8b

Please sign in to comment.