Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Problem on deselect in MapView #335

Open
emartinez-usgs opened this issue Jul 20, 2017 · 1 comment
Open

Problem on deselect in MapView #335

emartinez-usgs opened this issue Jul 20, 2017 · 1 comment
Labels

Comments

@emartinez-usgs
Copy link
Member

Reported from user email. Could not immediately reproduce. Needs confirmation...

There is a JS bug using the latest Chrome desktop browser (Version 59.0.3071.115 (Official Build) (64-bit)):

Open the map
Click on an earthquake in the list
Mouse down and drag the map

On mouse up, the following JS

error occurs and the map can no longer be dragged:

index.js:3 Uncaught TypeError: Cannot read property 'length' of null at Object.b.isFilterEnabled (index.js:3) at Object.b.deselectEventonMoveEnd (index.js:3) at Object.b.onMoveEnd (index.js:3) at Object.n (index.js:3) at e.fireEvent (leaflet.js:6) at e._onDragEnd (leaflet.js:8) at e.fireEvent (leaflet.js:6) at e._onUp (leaflet.js:8) at HTMLDocument.s (leaflet.js:8)

This error does not occur with IE or FireFox.

@jmfee-usgs
Copy link
Contributor

I'm unable to reproduce the issue, but based on the stack trace the problem appears to be here in the source:
https://github.com/usgs/earthquake-latest-earthquakes/blob/master/src/htdocs/js/map/MapView.js#L288

Not sure when _this.model.get('restrictListToMap') would return null, but that should be checked:

if (filter && filter.length === 0)

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

No branches or pull requests

2 participants