Skip to content
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

TypeError: null is not an object (evaluating 'v.x') #416

Closed
phet-steele opened this issue Oct 13, 2017 · 4 comments
Closed

TypeError: null is not an object (evaluating 'v.x') #416

phet-steele opened this issue Oct 13, 2017 · 4 comments

Comments

@phet-steele
Copy link
Contributor

Testing on current master.

  1. Highlight a battery.
  2. Drag that battery.
  3. While dragging, flip the battery with another finger.

Throws:

[Error] TypeError: null is not an object (evaluating 'v.x')
	subtract (Vector2.js:701)
	dragVertex (CircuitLayerNode.js:581)
	drag (FixedCircuitElementNode.js:152:83)
	move (SimpleDragHandler.js:142)
	dispatchToListeners (Input.js:790)
	dispatchEvent (Input.js:760)
	branchChangeEvents (Input.js:688)
	moveEvent (Input.js:653)
	touchMove (Input.js:440)
	run (BatchedDOMEvent.js:67)
	fireBatchedEvents (Input.js:204)
	batchEvent (Input.js:180)
	batchWindowEvent (BrowserEvents.js:279)
	ontouchmove (BrowserEvents.js:518)

Seen on iPad Air 2 iOS 9.3.5. For phetsims/qa/issues/51.

@ariel-phet
Copy link

This bug does not seem to affect sim use. @samreid your call if you want to do anything about it for 1.0

Feel free to mark deferred if this is more than a short fix (less than 30 minutes)

@ariel-phet ariel-phet removed their assignment Oct 13, 2017
@samreid
Copy link
Member

samreid commented Oct 15, 2017

I added a check that should prevent the error. The behavior looks the same on iPad, but hopefully doesn't throw the error. I didn't tether to verify this yet. I'll leave assigned to me and also assign to @phet-steele to see who gets a tether report first.

@samreid
Copy link
Member

samreid commented Oct 15, 2017

I simulated multitouch on mac chrome and verified the error is gone. Reassigning to @phet-steele to double check everything.

@phet-steele
Copy link
Contributor Author

Fixed, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants